...continued

<table><caption>Table S16: Baseline characteristics of for the included participants, according to their obesity status. Adequate statistical tests depending on the variable type assess whether each variable has a distinct distributions between the "exposed" and the "unexposed" group (with exposure being obesity, and no treatment being no obesity). We also report the Standardized mean difference (SMD) for each variable.</caption><thead><tr><th>variable role</th><th>variable name</th><th>variable modalities</th><th>Overall</th><th>Less than 14 weekly alcohol units</th><th>More than 14 weekly alcohol units</th><th>P-Value</th><th>Test</th><th>SMD (0,1)</th></tr></thead><tbody><tr><td rowspan="15">Qualifications - visit 2, n (%)</td><td>Just tried once or twice</td><td></td><td>5296 (16.3)</td><td>3534 (16.6)</td><td>1762 (15.7)</td><td rowspan="15">&lt;0.001</td><td rowspan="15">Chi-squared</td><td rowspan="15">0.082</td></tr><tr><td>Smoked occasionally</td><td></td><td>4008 (12.3)</td><td>2350 (11.1)</td><td>1658 (14.7)</td></tr><tr><td>Smoked on most or all days other</td><td></td><td>7287 (22.4)</td><td>3787 (17.8)</td><td>3500 (31.1)</td></tr><tr><td>A levels/AS levels or equivalent</td><td></td><td>689 (2.1)</td><td>383 (1.8)</td><td>306 (2.7)</td></tr><tr><td>CSEs or equivalent</td><td></td><td>4013 (12.3)</td><td>2618 (12.3)</td><td>1395 (12.4)</td></tr><tr><td>College or University degree</td><td></td><td>1205 (3.7)</td><td>804 (3.8)</td><td>401 (3.6)</td></tr><tr><td>NVQ or HND or HNC or equivalent</td><td></td><td>16203 (49.9)</td><td>10510 (49.4)</td><td>5693 (50.6)</td></tr><tr><td>None of the above</td><td></td><td>1901 (5.8)</td><td>1155 (5.4)</td><td>746 (6.6)</td></tr><tr><td>O levels/GCSEs or equivalent</td><td></td><td>1762 (5.4)</td><td>1221 (5.7)</td><td>541 (4.8)</td></tr><tr><td>Other professional qualifications eg: nursing, teaching other</td><td></td><td>5717 (17.6)</td><td>3762 (17.7)</td><td>1955 (17.4)</td></tr><tr><td>Other professional qualifications eg: nursing, teaching other</td><td></td><td>1596 (4.9)</td><td>1111 (5.2)</td><td>485 (4.3)</td></tr><tr><td>101 (0.3)</td><td></td><td>75 (0.4)</td><td>26 (0.2)</td><td></td></tr><tr><td>0.7 (3.0)</td><td></td><td>0.7 (3.0)</td><td>0.8 (2.9)</td><td>0.012</td><td></td><td></td></tr><tr><td>28.1 (26.8)</td><td></td><td>-27.7 (26.7)</td><td>-28.9 (26.8)</td><td>&lt;0.001</td><td></td><td></td></tr><tr><td>-1054.2 (25.1)</td><td></td><td>-1054.2 (25.1)</td><td>-1054.3 (25.1)</td><td>0.718</td><td></td><td></td></tr><tr><td>66.4 (5.9)</td><td></td><td>66.3 (6.0)</td><td>66.6 (5.8)</td><td>&lt;0.001</td><td></td><td></td></tr><tr><td>0.0 (0.2)</td><td></td><td>0.0 (0.2)</td><td>0.0 (0.2)</td><td>0.001</td><td></td><td></td></tr><tr><td rowspan="2">Sex - visit 0, n (%)</td><td>Female</td><td></td><td>17195 (52.9)</td><td>13324 (62.7)</td><td>3871 (34.4)</td><td rowspan="2">&lt;0.001</td><td rowspan="2">Chi-squared</td><td rowspan="2">0.589</td></tr><tr><td>Male</td><td></td><td>15303 (47.1)</td><td>7932 (37.3)</td><td>7371 (65.6)</td></tr><tr><td rowspan="4">Smoking status - visit 2, n (%)</td><td>Current</td><td></td><td>1065 (3.3)</td><td>534 (2.5)</td><td>531 (4.7)</td><td rowspan="4">&lt;0.001</td><td rowspan="4">Chi-squared</td><td rowspan="4">0.374</td></tr><tr><td>Never</td><td></td><td>20503 (63.1)</td><td>14727 (69.3)</td><td>5776 (51.4)</td></tr><tr><td>Previous other</td><td></td><td>10846 (33.4)</td><td>5942 (28.0)</td><td>4904 (43.6)</td></tr><tr><td>False</td><td></td><td>84 (0.3)</td><td>53 (0.2)</td><td>31 (0.3)</td></tr><tr><td rowspan="2">Social support, n (%)</td><td>False</td><td></td><td>12720 (39.1)</td><td>8371 (39.4)</td><td>4349 (38.7)</td><td rowspan="2">0.226</td><td rowspan="2">Chi-squared</td><td rowspan="2">0.014</td></tr><tr><td>True</td><td></td><td>19778 (60.9)</td><td>12885 (60.6)</td><td>6893 (61.3)</td></tr><tr><td>Townsend deprivation index at recruitment - visit 0, mean (SD)</td><td></td><td></td><td>-1.9 (2.7)</td><td>-1.9 (2.7)</td><td>-2.0 (2.7)</td><td>0.005</td><td>Two Sample T-test</td><td>-0.032</td></tr><tr><td rowspan="3">Uk biobank assessment centre - visit 2, n (%)</td><td>Cheadle</td><td></td><td>18991 (58.4)</td><td>12389 (58.3)</td><td>6602 (58.7)</td><td>0.130</td><td>Chi-squared</td><td>0.028</td></tr><tr><td>Newcastle</td><td></td><td>8436 (26.0)</td><td>5485 (25.8)</td><td>2951 (26.2)</td><td></td><td></td></tr><tr><td>Reading other</td><td></td><td>5028 (15.5)</td><td>3350 (15.8)</td><td>1678 (14.9)</td><td></td><td></td></tr><tr><td rowspan="3">Volumetric scaling from t1 head image to standard space - visit 2, mean (SD)</td><td></td><td></td><td>43 (0.1)</td><td>32 (0.2)</td><td>11 (0.1)</td><td rowspan="3">&lt;0.001</td><td rowspan="3">Chi-squared</td><td rowspan="3">0.417</td></tr><tr><td></td><td></td><td>1.3 (0.1)</td><td>1.3 (0.1)</td><td>1.3 (0.1)</td></tr><tr><td></td><td></td><td>-0.0 (4.7)</td><td>-0.3 (4.3)</td><td>1.5 (6.2)</td></tr></tbody></table>

<table><thead><tr><th>variable role</th><th>variable name</th><th>variable modalities</th><th>Overall</th><th>No obesity</th><th>Obesity</th><th>P-Value</th><th>Test</th><th>SMD (0,1)</th></tr></thead><tbody><tr><td>Sample size</td><td>n</td><td></td><td>32498</td><td>26781</td><td>5717</td><td></td><td>Two Sample T-test</td><td>0.054</td></tr><tr><td>Outcome</td><td>G factor, mean (SD)</td><td></td><td>-0.0 (1.1)</td><td>-0.0 (1.1)</td><td>0.0 (1.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.017</td></tr><tr><td rowspan="10">Mediators</td><td>Dmri pc 0, mean (SD)</td><td></td><td>-0.3 (10.2)</td><td>-0.3 (10.2)</td><td>-0.4 (10.3)</td><td>0.251</td><td>Two Sample T-test</td><td>-0.059</td></tr><tr><td>Dmri pc 1, mean (SD)</td><td></td><td>0.1 (5.2)</td><td>0.1 (5.1)</td><td>-0.2 (5.6)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.338</td></tr><tr><td>Dmri pc 2, mean (SD)</td><td></td><td>-0.1 (5.0)</td><td>-0.4 (4.7)</td><td>1.4 (6.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.412</td></tr><tr><td>Dmri pc 3, mean (SD)</td><td></td><td>0.0 (4.4)</td><td>-0.3 (4.3)</td><td>1.5 (4.3)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.048</td></tr><tr><td>Dmri pc 4, mean (SD)</td><td></td><td>0.0 (4.2)</td><td>-0.0 (4.1)</td><td>0.2 (4.8)</td><td>0.002</td><td>Two Sample T-test</td><td>0.038</td></tr><tr><td>Dmri pc 5, mean (SD)</td><td></td><td>0.0 (3.4)</td><td>-0.0 (3.4)</td><td>0.1 (3.6)</td><td>0.011</td><td>Two Sample T-test</td><td>-0.005</td></tr><tr><td>Smri dmri pc 0, mean (SD)</td><td></td><td>-0.4 (10.5)</td><td>-0.3 (10.5)</td><td>-0.4 (10.6)</td><td>0.747</td><td>Two Sample T-test</td><td>0.038</td></tr><tr><td>Smri dmri pc 1, mean (SD)</td><td></td><td>-0.2 (7.4)</td><td>-0.2 (7.3)</td><td>0.1 (7.8)</td><td>0.010</td><td>Two Sample T-test</td><td>-0.209</td></tr><tr><td>Smri dmri pc 2, mean (SD)</td><td></td><td>0.1 (5.6)</td><td>0.3 (5.5)</td><td>-0.8 (5.6)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.341</td></tr><tr><td>Smri dmri pc 3, mean (SD)</td><td></td><td>-0.0 (4.7)</td><td>-0.3 (4.3)</td><td>1.5 (6.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.341</td></tr></tbody></table>
...continued

<table><thead><tr><th>variable role</th><th>variable name</th><th>variable modalities</th><th>Overall</th><th>No obesity</th><th>Obesity</th><th>P-Value</th><th>Test</th><th>SMD (0,1)</th></tr></thead><tbody><tr><td rowspan="10">Confounders (alphabetic order)</td><td>Smri dmri pc 4, mean (SD)</td><td rowspan="10">No</td><td>-0.0 (4.3)</td><td>-0.3 (4.3)</td><td>1.2 (4.1)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.354</td></tr><tr><td>Smri dmri pc 5, mean (SD)</td><td>0.0 (4.3)</td><td>-0.0 (4.2)</td><td>0.3 (4.7)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.058</td></tr><tr><td>Smri pc 0, mean (SD)</td><td>0.3 (7.2)</td><td>0.3 (7.1)</td><td>0.2 (7.4)</td><td>0.441</td><td>Two Sample T-test</td><td>-0.011</td></tr><tr><td>Smri pc 1, mean (SD)</td><td>-0.0 (3.3)</td><td>-0.2 (3.3)</td><td>0.7 (3.4)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.274</td></tr><tr><td>Smri pc 2, mean (SD)</td><td>-0.1 (2.8)</td><td>-0.1 (2.8)</td><td>-0.1 (2.9)</td><td>0.085</td><td>Two Sample T-test</td><td>-0.025</td></tr><tr><td>Smri pc 3, mean (SD)</td><td>0.0 (2.1)</td><td>-0.1 (2.0)</td><td>0.3 (2.1)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.165</td></tr><tr><td>Adopted as a child - visit 0, n (%)</td><td>32469 (99.9)</td><td>26756 (99.9)</td><td>5713 (99.9)</td><td>0.629</td><td>Chi-squared (warning: expected count &lt; 5)</td><td>0.015</td></tr><tr><td>Age when attended assessment centre - visit 2, mean (SD)</td><td>Yes</td><td>9 (0.0)</td><td>7 (0.0)</td><td>2 (0.0)</td><td rowspan="2">&lt;0.001</td><td rowspan="2">Two Sample T-test</td><td rowspan="2">-0.144</td></tr><tr><td>Alcohol above nhs reco, n (%)</td><td>other</td><td>20 (0.1)</td><td>18 (0.1)</td><td>2 (0.0)</td></tr><tr><td>Alcohol intake frequency. - visit 2, n (%)</td><td>0</td><td>63.7 (7.6)</td><td>63.9 (7.6)</td><td>62.8 (7.5)</td><td>0.826</td><td>Chi-squared</td><td>0.003</td></tr><tr><td>Average total household income before tax - visit 2, n (%)</td><td>Daily or almost daily</td><td>11242 (34.6)</td><td>17509 (65.4)</td><td>3747 (65.5)</td><td rowspan="6">&lt;0.001</td><td rowspan="6">Chi-squared</td><td rowspan="6">0.251</td></tr><tr><td></td><td>Never</td><td>5540 (17.0)</td><td>4731 (17.7)</td><td>1970 (34.5)</td></tr><tr><td></td><td>Once or twice a week</td><td>2032 (6.3)</td><td>1603 (6.0)</td><td>809 (14.2)</td></tr><tr><td></td><td>One to three times a month</td><td>8640 (26.6)</td><td>7142 (26.7)</td><td>429 (7.5)</td></tr><tr><td></td><td>Special occasions only</td><td>3788 (11.7)</td><td>2937 (11.0)</td><td>1498 (26.2)</td></tr><tr><td></td><td>Three or four times a week</td><td>3262 (10.0)</td><td>2447 (9.1)</td><td>851 (14.9)</td></tr><tr><td></td><td>18,000 to 30,999</td><td>9236 (28.4)</td><td>7921 (29.6)</td><td>1315 (23.0)</td><td rowspan="5">&lt;0.001</td><td rowspan="5">Chi-squared</td><td rowspan="5">0.131</td></tr><tr><td>Breastfed as a baby - visit 0, n (%)</td><td>31,000 to 51,999</td><td>9156 (28.2)</td><td>7589 (28.3)</td><td>1567 (27.4)</td></tr><tr><td></td><td>52,000 to 100,000</td><td>7028 (21.6)</td><td>5853 (21.9)</td><td>1175 (20.6)</td></tr><tr><td></td><td>Do not know</td><td>961 (3.0)</td><td>800 (3.0)</td><td>161 (2.8)</td></tr><tr><td></td><td>Greater than 100,000</td><td>2277 (7.0)</td><td>1975 (7.4)</td><td>302 (5.3)</td></tr><tr><td>Cmdd final, n (%)</td><td>Less than 18,000</td><td>3402 (10.5)</td><td>2658 (9.9)</td><td>744 (13.0)</td><td rowspan="2">0.008</td><td rowspan="2">Chi-squared (warning: expected count &lt; 5)</td><td rowspan="2">0.050</td></tr><tr><td>Comparative body size at age 10 - visit 0, n (%)</td><td>About average</td><td>1861 (5.7)</td><td>1531 (5.7)</td><td>330 (5.8)</td></tr><tr><td></td><td>Do not know</td><td>6175 (19.0)</td><td>5107 (19.1)</td><td>1068 (18.7)</td><td></td><td>Chi-squared</td><td>0.160</td></tr><tr><td></td><td>Yes</td><td>7174 (22.1)</td><td>5814 (21.7)</td><td>1360 (23.8)</td><td rowspan="3">&lt;0.001</td><td rowspan="3">Chi-squared</td><td rowspan="3">0.407</td></tr><tr><td></td><td>other</td><td>19136 (58.9)</td><td>15849 (59.2)</td><td>3287 (57.5)</td></tr><tr><td></td><td>False</td><td>13 (0.0)</td><td>11 (0.0)</td><td>2 (0.0)</td></tr><tr><td></td><td>True</td><td>23413 (72.0)</td><td>19639 (73.3)</td><td>3774 (66.0)</td><td rowspan="2">&lt;0.001</td><td rowspan="2">Chi-squared (warning: expected count &lt; 5)</td><td rowspan="2">0.037</td></tr><tr><td></td><td>About average</td><td>9085 (28.0)</td><td>7142 (26.7)</td><td>1943 (34.0)</td></tr><tr><td></td><td>Do not know</td><td>16637 (51.2)</td><td>13873 (51.8)</td><td>2764 (48.3)</td><td></td><td>Chi-squared (warning: expected count &lt; 5)</td><td>0.066</td></tr><tr><td>Comparative height size at age 10 - visit 0, n (%)</td><td>Plumper</td><td>347 (1.1)</td><td>292 (1.1)</td><td>55 (1.0)</td><td rowspan="4">0.171</td><td rowspan="4">Chi-squared (warning: expected count &lt; 5)</td><td rowspan="4">0.037</td></tr><tr><td></td><td>Thinner</td><td>4922 (15.1)</td><td>3353 (12.5)</td><td>1569 (27.4)</td></tr><tr><td></td><td>other</td><td>10584 (32.6)</td><td>9257 (34.6)</td><td>1327 (23.2)</td></tr><tr><td></td><td>About average</td><td>8 (0.0)</td><td>6 (0.0)</td><td>2 (0.0)</td></tr><tr><td>Country of birth (uk/elsewhere) - visit 0, n (%)</td><td>Do not know</td><td>17039 (52.4)</td><td>14008 (52.3)</td><td>3031 (53.0)</td><td></td><td>Chi-squared (warning: expected count &lt; 5)</td><td>0.066</td></tr><tr><td></td><td>Shorter</td><td>293 (0.9)</td><td>233 (0.9)</td><td>60 (1.0)</td><td rowspan="3">0.002</td><td rowspan="3">Chi-squared (warning: expected count &lt; 5)</td><td rowspan="3">0.066</td></tr><tr><td></td><td>Taller</td><td>6569 (20.2)</td><td>5473 (20.4)</td><td>1096 (19.2)</td></tr><tr><td></td><td>other</td><td>8589 (26.4)</td><td>7061 (26.4)</td><td>1528 (26.7)</td></tr><tr><td></td><td>Elsewhere</td><td>8 (0.0)</td><td>6 (0.0)</td><td>2 (0.0)</td><td></td><td>Chi-squared</td><td>0.145</td></tr><tr><td>Current employment status - visit 2, n (%)</td><td>England</td><td>27360 (84.2)</td><td>22455 (83.8)</td><td>4905 (85.8)</td><td rowspan="7">&lt;0.001</td><td rowspan="7">Chi-squared</td><td rowspan="7">0.145</td></tr><tr><td></td><td>Northern Ireland</td><td>234 (0.7)</td><td>200 (0.7)</td><td>34 (0.6)</td></tr><tr><td></td><td>Republic of Ireland</td><td>217 (0.7)</td><td>181 (0.7)</td><td>36 (0.6)</td></tr><tr><td></td><td>Scotland</td><td>2296 (7.1)</td><td>1917 (7.2)</td><td>379 (6.6)</td></tr><tr><td></td><td>Wales</td><td>600 (1.8)</td><td>502 (1.9)</td><td>98 (1.7)</td></tr><tr><td></td><td>other</td><td>13 (0.0)</td><td>8 (0.0)</td><td>5 (0.1)</td></tr><tr><td></td><td>In paid employment or self-employed</td><td>12978 (39.9)</td><td>10413 (38.9)</td><td>2565 (44.9)</td></tr><tr><td></td><td>Retired</td><td>18302 (56.3)</td><td>15416 (57.6)</td><td>2886 (50.5)</td><td></td><td>Chi-squared</td><td>0.145</td></tr><tr><td></td><td>other</td><td>1218 (3.7)</td><td>952 (3.6)</td><td>266 (4.7)</td><td></td><td>Chi-squared</td><td>0.145</td></tr></tbody></table>
...continued

<table><thead><tr><th>variable role</th><th>variable name</th><th>variable modalities</th><th>Overall</th><th>No obesity</th><th>Obesity</th><th>P-Value</th><th>Test</th><th>SMD (0,1)</th></tr></thead><tbody><tr><td></td><td>Current smoker, n (%)</td><td>0</td><td>31893 (98.1)</td><td>26287 (98.2)</td><td>5606 (98.1)</td><td>0.661</td><td>Chi-squared</td><td>0.007</td></tr><tr><td></td><td></td><td>1</td><td>605 (1.9)</td><td>494 (1.8)</td><td>111 (1.9)</td><td></td><td></td><td></td></tr><tr><td></td><td>Current tobacco smoking - visit 2, n (%)</td><td>No</td><td>31431 (96.7)</td><td>25914 (96.8)</td><td>5517 (96.5)</td><td>0.559</td><td>Chi-squared</td><td>0.015</td></tr><tr><td></td><td></td><td>Yes, on most or all days</td><td>605 (1.9)</td><td>494 (1.8)</td><td>111 (1.9)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>462 (1.4)</td><td>373 (1.4)</td><td>89 (1.6)</td><td></td><td></td><td></td></tr><tr><td></td><td>Diabetic, n (%)</td><td>0</td><td>31154 (95.9)</td><td>25986 (97.0)</td><td>5168 (90.4)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.276</td></tr><tr><td></td><td></td><td>1</td><td>1344 (4.1)</td><td>795 (3.0)</td><td>549 (9.6)</td><td></td><td></td><td></td></tr><tr><td></td><td>Ethnic background - visit 2, n (%)</td><td>British</td><td>7408 (22.8)</td><td>6002 (22.4)</td><td>1406 (24.6)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.051</td></tr><tr><td></td><td></td><td>other</td><td>25090 (77.2)</td><td>20779 (77.6)</td><td>4311 (75.4)</td><td></td><td></td><td></td></tr><tr><td></td><td>Ever smoked - visit 2, n (%)</td><td>No</td><td>15217 (46.8)</td><td>12657 (47.3)</td><td>2560 (44.8)</td><td>0.002</td><td>Chi-squared</td><td>0.052</td></tr><tr><td></td><td></td><td>Yes</td><td>17196 (52.9)</td><td>14058 (52.5)</td><td>3138 (54.9)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>85 (0.3)</td><td>66 (0.2)</td><td>19 (0.3)</td><td></td><td></td><td></td></tr><tr><td></td><td>Handedness (chirality/laterality) - visit 0, n (%)</td><td>Left-handed</td><td>3043 (9.4)</td><td>2531 (9.5)</td><td>512 (9.0)</td><td>0.329</td><td>Chi-squared (warning: expected count &lt; 5)</td><td>0.025</td></tr><tr><td></td><td></td><td>Right-handed</td><td>28957 (89.1)</td><td>23840 (89.0)</td><td>5117 (89.5)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Use both right and left hands</td><td>486 (1.5)</td><td>402 (1.5)</td><td>84 (1.5)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>equally</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>12 (0.0)</td><td>8 (0.0)</td><td>4 (0.1)</td><td></td><td></td><td></td></tr><tr><td></td><td>Hypercholesterol, n (%)</td><td>0</td><td>24538 (75.5)</td><td>20772 (77.6)</td><td>3766 (65.9)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.262</td></tr><tr><td></td><td></td><td>1</td><td>7960 (24.5)</td><td>6009 (22.4)</td><td>1951 (34.1)</td><td></td><td></td><td></td></tr><tr><td></td><td>Hypertensive, n (%)</td><td>0</td><td>23962 (73.7)</td><td>20681 (77.2)</td><td>3281 (57.4)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.433</td></tr><tr><td></td><td></td><td>1</td><td>8536 (26.3)</td><td>6100 (22.8)</td><td>2436 (42.6)</td><td></td><td></td><td></td></tr><tr><td></td><td>Inflammation, n (%)</td><td>False</td><td>27267 (83.9)</td><td>23527 (87.8)</td><td>3740 (65.4)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.550</td></tr><tr><td></td><td></td><td>True</td><td>5231 (16.1)</td><td>3254 (12.2)</td><td>1977 (34.6)</td><td></td><td></td><td></td></tr><tr><td></td><td>Job involves shift work - visit 2, n (%)</td><td>Always</td><td>795 (2.4)</td><td>592 (2.2)</td><td>203 (3.6)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.126</td></tr><tr><td></td><td></td><td>Never/rarely</td><td>11077 (34.1)</td><td>8958 (33.4)</td><td>2119 (37.1)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Sometimes</td><td>855 (2.6)</td><td>681 (2.5)</td><td>174 (3.0)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>19771 (60.8)</td><td>16550 (61.8)</td><td>3221 (56.3)</td><td></td><td></td><td></td></tr><tr><td></td><td>Length of time at current address - visit 2, mean (SD)</td><td></td><td>21.0 (13.9)</td><td>21.1 (13.8)</td><td>20.5 (14.1)</td><td>0.005</td><td>Two Sample T-test</td><td>-0.041</td></tr><tr><td></td><td>Life long depression, n (%)</td><td>False</td><td>27461 (84.5)</td><td>22816 (85.2)</td><td>4645 (81.2)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.106</td></tr><tr><td></td><td></td><td>True</td><td>5037 (15.5)</td><td>3965 (14.8)</td><td>1072 (18.8)</td><td></td><td></td><td></td></tr><tr><td></td><td>Ls pc dim.1, mean (SD)</td><td></td><td>0.6 (2.0)</td><td>0.7 (2.0)</td><td>0.0 (2.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.332</td></tr><tr><td></td><td>Ls pc dim.2, mean (SD)</td><td></td><td>-0.4 (2.0)</td><td>-0.3 (2.0)</td><td>-0.9 (2.0)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.280</td></tr><tr><td></td><td>Maternal smoking around birth - visit 0, n (%)</td><td>Do not know</td><td>3388 (10.4)</td><td>2810 (10.5)</td><td>578 (10.1)</td><td>&lt;0.001</td><td>Chi-squared (warning: expected count &lt; 5)</td><td>0.156</td></tr><tr><td></td><td></td><td>No</td><td>20344 (62.6)</td><td>17077 (63.8)</td><td>3267 (57.1)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Yes</td><td>8749 (26.9)</td><td>6881 (25.7)</td><td>1868 (32.7)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>17 (0.1)</td><td>13 (0.0)</td><td>4 (0.1)</td><td></td><td></td><td></td></tr><tr><td></td><td>Mh pc dim.1, mean (SD)</td><td></td><td>1.0 (6.5)</td><td>1.3 (6.4)</td><td>-0.4 (7.0)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.252</td></tr><tr><td></td><td>Mh pc dim.2, mean (SD)</td><td></td><td>0.5 (3.3)</td><td>0.5 (3.3)</td><td>0.2 (3.4)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.093</td></tr><tr><td></td><td>Number in household - visit 2, mean (SD)</td><td></td><td>2.2 (1.0)</td><td>2.2 (1.0)</td><td>2.2 (1.1)</td><td>0.950</td><td>Two Sample T-test</td><td>-0.001</td></tr><tr><td></td><td>Number of full brothers - visit 2, mean (SD)</td><td></td><td>1.0 (1.1)</td><td>1.0 (1.1)</td><td>1.1 (1.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.078</td></tr><tr><td></td><td>Number of full sisters - visit 2, mean (SD)</td><td></td><td>1.0 (1.1)</td><td>1.0 (1.1)</td><td>1.0 (1.2)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.071</td></tr><tr><td></td><td>Number of vehicles in household - visit 2, n (%)</td><td>Four or more</td><td>922 (2.8)</td><td>724 (2.7)</td><td>198 (3.5)</td><td>0.001</td><td>Chi-squared</td><td>0.066</td></tr><tr><td></td><td></td><td>None</td><td>1265 (3.9)</td><td>1011 (3.8)</td><td>254 (4.4)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>One</td><td>13770 (42.4)</td><td>11333 (42.3)</td><td>2437 (42.6)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Three</td><td>3034 (9.3)</td><td>2483 (9.3)</td><td>551 (9.6)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Two</td><td>13471 (41.5)</td><td>11202 (41.8)</td><td>2269 (39.7)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>36 (0.1)</td><td>28 (0.1)</td><td>8 (0.1)</td><td></td><td></td><td></td></tr><tr><td></td><td>Part of a multiple birth - visit 0, n (%)</td><td>No</td><td>31809 (97.9)</td><td>26199 (97.8)</td><td>5610 (98.1)</td><td>0.169</td><td>Chi-squared</td><td>0.028</td></tr><tr><td></td><td></td><td>Yes</td><td>644 (2.0)</td><td>547 (2.0)</td><td>97 (1.7)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>45 (0.1)</td><td>35 (0.1)</td><td>10 (0.2)</td><td></td><td></td><td></td></tr><tr><td></td><td>Past tobacco smoking - visit 2, n (%)</td><td>I have never smoked</td><td>15218 (46.8)</td><td>12658 (47.3)</td><td>2560 (44.8)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.180</td></tr><tr><td></td><td></td><td>Just tried once or twice</td><td>5296 (16.3)</td><td>4522 (16.9)</td><td>774 (13.5)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Smoked occasionally</td><td>4008 (12.3)</td><td>3378 (12.6)</td><td>630 (11.0)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Smoked on most or all days</td><td>7287 (22.4)</td><td>5664 (21.1)</td><td>1623 (28.4)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>689 (2.1)</td><td>559 (2.1)</td><td>130 (2.3)</td><td></td><td></td><td></td></tr><tr><td></td><td>Qualifications - visit 2, n (%)</td><td>A levels/AS levels or equivalent</td><td>4013 (12.3)</td><td>3245 (12.1)</td><td>768 (13.4)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.239</td></tr></tbody></table>
...continued

<table><thead><tr><th>variable role</th><th>variable name</th><th>variable modalities</th><th>Overall</th><th>No obesity</th><th>Obesity</th><th>P-Value</th><th>Test</th><th>SMD (0,1)</th></tr></thead><tbody><tr><td></td><td></td><td>CSEs or equivalent</td><td>1205 (3.7)</td><td>883 (3.3)</td><td>322 (5.6)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>College or University degree</td><td>16203 (49.9)</td><td>13850 (51.7)</td><td>2353 (41.2)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>NVQ or HND or HNC or equivalent</td><td>1901 (5.8)</td><td>1472 (5.5)</td><td>429 (7.5)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>None of the above</td><td>1762 (5.4)</td><td>1337 (5.0)</td><td>425 (7.4)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>O levels/GCSEs or equivalent</td><td>5717 (17.6)</td><td>4612 (17.2)</td><td>1105 (19.3)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Other professional qualifications eg: nursing, teaching other</td><td>1596 (4.9)</td><td>1304 (4.9)</td><td>292 (5.1)</td><td></td><td></td><td></td></tr><tr><td></td><td>Scanner lateral (x) brain position - visit 2, mean (SD)</td><td></td><td>101 (0.3)</td><td>78 (0.3)</td><td>23 (0.4)</td><td></td><td></td><td></td></tr><tr><td></td><td>Scanner longitudinal (z) brain position - visit 2, mean (SD)</td><td></td><td>0.7 (3.0)</td><td>0.7 (3.0)</td><td>0.7 (3.0)</td><td>0.690</td><td>Two Sample T-test</td><td>0.006</td></tr><tr><td></td><td>Scanner table position - visit 2, mean (SD)</td><td></td><td>-28.1 (26.8)</td><td>-27.2 (26.4)</td><td>-32.1 (27.8)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.181</td></tr><tr><td></td><td>Scanner transverse (y) brain position - visit 2, mean (SD)</td><td></td><td>-1054.2 (25.1)</td><td>-1054.0 (24.8)</td><td>-1055.6 (26.5)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.062</td></tr><tr><td></td><td>Self declared mental exclusion visit 2, mean (SD)</td><td></td><td>66.4 (5.9)</td><td>66.2 (5.9)</td><td>67.0 (6.1)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.133</td></tr><tr><td></td><td>Sex - visit 0, n (%)</td><td></td><td>0.0 (0.2)</td><td>0.0 (0.2)</td><td>0.0 (0.2)</td><td>0.125</td><td>Two Sample T-test</td><td>0.023</td></tr><tr><td></td><td>Smoking status - visit 2, n (%)</td><td>Female</td><td>17195 (52.9)</td><td>14235 (53.2)</td><td>2960 (51.8)</td><td>0.060</td><td>Chi-squared</td><td>0.028</td></tr><tr><td></td><td></td><td>Male</td><td>15303 (47.1)</td><td>12546 (46.8)</td><td>2757 (48.2)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Current</td><td>1065 (3.3)</td><td>865 (3.2)</td><td>200 (3.5)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.121</td></tr><tr><td></td><td></td><td>Never</td><td>20503 (63.1)</td><td>17171 (64.1)</td><td>3332 (58.3)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Previous</td><td>10846 (33.4)</td><td>8680 (32.4)</td><td>2166 (37.9)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>84 (0.3)</td><td>65 (0.2)</td><td>19 (0.3)</td><td></td><td></td><td></td></tr><tr><td></td><td>Social support, n (%)</td><td>False</td><td>12720 (39.1)</td><td>10405 (38.9)</td><td>2315 (40.5)</td><td>0.022</td><td>Chi-squared</td><td>0.034</td></tr><tr><td></td><td></td><td>True</td><td>19778 (60.9)</td><td>16376 (61.1)</td><td>3402 (59.5)</td><td></td><td></td><td></td></tr><tr><td></td><td>Total alcohol weekly units 2, mean (SD)</td><td></td><td>13.1 (14.4)</td><td>13.0 (13.9)</td><td>13.4 (16.6)</td><td>0.109</td><td>Two Sample T-test</td><td>0.025</td></tr><tr><td></td><td>Townsend deprivation index at recruitment - visit 0, mean (SD)</td><td></td><td>-1.9 (2.7)</td><td>-2.0 (2.7)</td><td>-1.6 (2.8)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>0.148</td></tr><tr><td></td><td>Uk biobank assessment centre - visit 2, n (%)</td><td>Cheadle</td><td>18991 (58.4)</td><td>15482 (57.8)</td><td>3509 (61.4)</td><td>&lt;0.001</td><td>Chi-squared</td><td>0.110</td></tr><tr><td></td><td></td><td>Newcastle</td><td>8436 (26.0)</td><td>6945 (25.9)</td><td>1491 (26.1)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Reading</td><td>5028 (15.5)</td><td>4320 (16.1)</td><td>708 (12.4)</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>other</td><td>43 (0.1)</td><td>34 (0.1)</td><td>9 (0.2)</td><td></td><td></td><td></td></tr><tr><td></td><td>Volumetric scaling from t1 head image to standard space - visit 2, mean (SD)</td><td></td><td>1.3 (0.1)</td><td>1.3 (0.1)</td><td>1.3 (0.1)</td><td>&lt;0.001</td><td>Two Sample T-test</td><td>-0.072</td></tr></tbody></table>
<figure><img src="image_24.png" /><figcaption>Figure S14: Causal total, direct and indirect effect of hypertension on cognitive functions, mediated through the brain structure. The top panel represents results presented in the main text, with 5 components for the imputation of missing values by PCA for confounding variables, and the bottom panel with 2 components. We observe very similar results. We also show the estimates obtained with different estimators, and again, results are quite similar among the different approaches. Each estimate is represented as a mean over 100 bootstrapped samples. The error bar is the 95% percentile-interval, estimated from the empirical bootstrap distribution.</figcaption></figure>

<caption>Listing 1: Dagitty code to reproduce the causal graph used for the mediation analysis.</caption>

```
dag {
  "brain MRI" [pos="-0.218,1.511"]
  "brain structure" [pos="-0.632,1.291"]
  "cognitive functions" [outcome, pos="1.301,1.740"]
  "college degree" [pos="-1.479,0.467"]
  "current depression" [pos="0.466,0.306"]
  "current smoking" [exposure, pos="-2.097,1.745"]
  "drug use" [pos="-1.333,-0.761"]
  "early life factors" [latent, pos="-0.856,-1.068"]
  "life long depression" [pos="0.337,-0.074"]
  "lifestyle factors" [latent, pos="-1.608,-0.454"]
  "maternal smoking" [pos="-1.003,-1.667"]
  "number of vehicles" [pos="0.631,-1.689"]
  "physical activity" [pos="-2.063,-0.610"]
  "screen use" [pos="-1.617,-0.903"]
  "social support" [pos="0.967,0.141"]
  "socio economic factors" [latent, pos="-0.027,-1.257"]
  "townsend index" [pos="0.246,-1.750"]
  "weight and height age 10" [pos="-1.598,-1.789"]
  U [latent, pos="-2.200,-1.520"]
  age [pos="0.954,-1.351"]
  alcohol [pos="-1.846,0.848"]
  diabetes [pos="-1.041,0.019"]
  hypercholesterol [pos="-0.623,0.082"]
  hypertension [pos="-0.152,0.146"]
  inflammation [pos="0.863,-0.259"]
  obesity [pos="1.414,0.370"]
  revenue [pos="-0.203,-1.711"]
  sex [pos="1.410,-1.112"]
  siblings [pos="-0.592,-1.633"]
}
```
<figure><img src="image_25.png" /><figcaption>Figure S15: Causal total, direct and indirect effect of current smoking on cognitive functions, mediated through the brain structure. The top panel represents results presented in the main text, with 5 components for the imputation of missing values by PCA for confounding variables, and the bottom panel with 2 components. We observe very similar results. We also show the estimates obtained with different estimators, and again, results are quite similar among the different approaches. Each estimate is represented as a mean over 100 bootstrapped samples. The error bar is the 95% percentile-interval, estimated from the empirical bootstrap distribution.</figcaption></figure>

"brain structure" -> "brain MRI"
"brain structure" -> "cognitive functions"
"college degree" -> "brain structure"
"college degree" -> "cognitive functions"
"current depression" -> "brain structure"
"current depression" -> "cognitive functions"
"current smoking" -> "brain structure"
"current smoking" -> "cognitive functions"
"early life factors" -> "brain structure"
"early life factors" -> "cognitive functions"
"early life factors" -> "college degree"
"early life factors" -> "current depression"
"early life factors" -> "current smoking"
"early life factors" -> "life long depression"
"early life factors" -> "maternal smoking"
"early life factors" -> "social support"
"early life factors" -> "weight and height age 10"
"early life factors" -> "alcohol"
"early life factors" -> "diabetes"
"early life factors" -> "hypercholesterol"
"early life factors" -> "hypertension"
"early life factors" -> "inflammation"
"early life factors" -> "obesity"
"early life factors" -> "siblings"
"life long depression" -> "brain structure"
"life long depression" -> "cognitive functions"
"lifestyle factors" -> "brain structure"
"lifestyle factors" -> "cognitive functions"
"lifestyle factors" -> "college degree"
"lifestyle factors" -> "current depression"
"lifestyle factors" -> "current smoking"
"lifestyle factors" -> "drug use"
"lifestyle factors" -> "life long depression"
"lifestyle factors" -> "physical activity"
"lifestyle factors" -> "screen use"
"lifestyle factors" -> "social support"
"lifestyle factors" -> alcohol
"lifestyle factors" -> diabetes
"lifestyle factors" -> hypercholesterol
"lifestyle factors" -> hypertension
"lifestyle factors" -> inflammation
"lifestyle factors" -> obesity
"social support" -> "brain structure"
"social support" -> "cognitive functions"
"socio economic factors" -> "brain structure"
"socio economic factors" -> "cognitive functions"
"socio economic factors" -> "college degree"
"socio economic factors" -> "current depression"
"socio economic factors" -> "current smoking"
"socio economic factors" -> "life long depression"
"socio economic factors" -> "number of vehicles"
"socio economic factors" -> "social support"
"socio economic factors" -> "townsend index"
"socio economic factors" -> alcohol
"socio economic factors" -> diabetes
"socio economic factors" -> hypercholesterol
"socio economic factors" -> hypertension
"socio economic factors" -> inflammation
"socio economic factors" -> obesity
"socio economic factors" -> revenue
U -> "current smoking"
U -> "early life factors"
U -> "lifestyle factors"
U -> "socio economic factors"
age -> "brain structure"
age -> "cognitive functions"
age -> "college degree"
age -> "current depression"
age -> "current smoking"
age -> "life long depression"
age -> "social support"
age -> alcohol
age -> diabetes
age -> hypercholesterol
age -> hypertension
age -> inflammation
age -> obesity
alcohol -> "brain structure"
alcohol -> "cognitive functions"
diabetes -> "brain structure"
diabetes -> "cognitive functions"
hypercholesterol -> "brain structure"
hypercholesterol -> "cognitive functions"
hypertension -> "brain structure"
hypertension -> "cognitive functions"
inflammation -> "brain structure"
inflammation -> "cognitive functions"
obesity -> "brain structure"
obesity -> "cognitive functions"
sex -> "brain structure"
sex -> "cognitive functions"
sex -> "college degree"
sex -> "current depression"
sex -> "current smoking"
sex -> "life long depression"
sex -> "social support"
sex -> alcohol
sex -> diabetes

sex -> hypercholesterol

sex -> hypertension

sex -> inflammation

sex -> obesity

}