Childhood intelligence and risk of depression in later-life: A longitudinal data-linkage study

Background Lower childhood intelligence test scores are reported in some studies to be associated with higher risk of depression in adulthood. The reasons for the association are unclear. This longitudinal data-linkage study explored the relationship between childhood intelligence (at age ∼11) and risk of depression in later-life (up to age ∼85), and whether childhood family structure and adulthood socio-economic and geographical factors accounted for some of this association. Methods Intelligence test scores collected in the Scottish Mental Survey 1947 were linked to electronic health records (hospital admissions and prescribing data) between 1980 and 2020 (n = 53,037), to identify diagnoses of depression. Mixed-effect Cox regression models were used to explore the relationship between childhood intelligence test scores and risk of depression in later-life. Analyses were also adjusted for childhood family structure (size of family) and adulthood socio-economic and geographical factors (Carstairs index, urban/rural). Results Twenty-seven percent of participants were diagnosed with depression during follow-up (n = 14,063/53,037). Greater childhood intelligence test scores were associated with a reduced risk of depression in an unadjusted analysis (HR = 0.95, 95% CI = 0.93 to 0.97, P < 0.001), and after adjustment for factors experienced in childhood and adulthood (HR = 0.95, 95% CI = 0.91 to 1.00, P = 0.032). When identifying depression using only hospital admissions data, greater childhood intelligence test scores were associated with a reduced risk of depression following unadjusted analysis (HR = 0.86, 95% CI = 0.82 to 0.90, P < 0.001), and after adjusting for risk factors in childhood and adulthood (HR = 0.94, 95% CI = 0.89 to 0.99, P = 0.026). There was no association between childhood cognitive test scores and depression when identifying cases of depression using only prescribed drugs data. Conclusions This study provides additional evidence suggesting that higher childhood intelligence predicts reduced risk of later-life depression only when depression is assessed based on hospital admission records. Childhood family structure and adulthood socio-economic and geographical factors did not seem to be substantial confounders.


Introduction
Depression is estimated to affect over 280 million people worldwide (World Health Organisation, 2021).Uncovering ways to prevent depression is the main research priority for people who have experienced depression (James Lind Alliance Priority Setting Partnerships, 2016).There are many risk factors for depression including sex, genetic, and environmental factors (Hyde & Mezulis, 2020).Many environmental factors originate in early life.Identifying modifiable environmental risk factors, particularly in childhood, may help to identify interventions for the primary prevention of depression.
Intelligence is also associated with risk of depression in many, but not all, studies.A meta-analysis of 34 study samples (categorical and continuous outcomes of depression) found that higher intelligence decreased the risk of subsequent depression (r = − 0.09, 95%CI = − 0.121 to − 0.054, P < 0.001) (Scult et al., 2017).However, this association was confounded by the presence of depressive symptoms at the time of cognitive assessment (Scult et al., 2017).Of the 23 studies in the review that assessed cognition prior to age 18 years, none measured the association between childhood intelligence and depression after age 55 years.A subsequent study found that higher intelligence (assessed between age 15-23 years) was associated with an increased risk of depression prior to age 50, but a lower risk of depression at the age of 50 years (Wraw et al., 2016).These findings highlight that when trying to understand the association between intelligence and depression, and the potential causes of the association, studies should follow-up participants throughout the life course.
Several studies have reported that lower childhood intelligence predicts premature mortality and comorbidities (e.g., cardiovascular disease) (Calvin et al., 2017;Wrulich et al., 2015;Hagger-Johnson et al.).Having a measure of intelligence in childhood is highly valuable as it allows researchers to understand the association between intelligence and subsequent health outcomes without the potentially confounding effects of contemporaneous depressive symptoms and subsequent level of education (lower level of education is also reported to increase risk of later-life depression (Chang-Quan et al., 2010)).
On the 14 th June 1947, nearly all children aged ~11 years in Scotland took part in the Scottish Mental Survey 1947 (SMS1947).This survey assessed intelligence using the Moray House Test No. 12 (Scottish Council for Research in Education Mental Survey, 1949).A subsequent study, examined the relationship between childhood intelligence and symptoms of depression in later-life (assessed at five intervals between the years of 2004 (n = 1091) and 2019 (n = 431)) in a subset of SMS1947 (Iveson et al., 2022).This study did not find an association between childhood intelligence and risk of depression, however, they only measured depressive symptoms experienced a week prior to the follow-up intervals, meaning cases of depression could have been missed.In our current study, we included a much larger sample of participants who had taken part in SMS1947 (n = 53,037), we also improved the coverage of depression by identifying cases of depression reported in electronic health records, thus reducing the risk of attrition.
As described above, there is a well-established association between early-life intelligence and later occurrence of depressive illness, however, we do not understand the causes of this association.Given findings that higher household income, higher education, and urbanisation increase risk of depression, (Freeman et al., 2016;Purtle et al., 2019) and these factors relate to both intelligence and depression, it is important to account for these potentially important environmental factors across the life course.Environmental factors experienced in childhood (e.g., parental income, family structure, geographical location, emotional/social support) and adulthood (e.g., income, social class, work-stress) may mediate or moderate the association between childhood intelligence and depression in later-life.For example, having fewer siblings in childhood may enable a child to receive more financial support from their parents, which could lead to better educational and recreational opportunities, and a higher paid job in adulthood.These factors may reduce a person's risk of depression.
Intelligence may also influence the environmental factors that a person is exposed to (i.e., those with higher intelligence may be exposed to better socioeconomic conditions, that may in turn minimise the risk of depression).Thus, the present well-powered population-level study (using a year-of-birth cohort in all of Scotland; n > 53,000) with a measure of cognitive differences in early life (prior to secondary-level educational differences and depression onset), childhood family structure, adulthood socioeconomic and geographical factors, health record data linkage, and an exceptionally long follow up period into older age (up to age 85 years) might offer important insights into the relationship between childhood intelligence and risk of depression in later-life.

Methods
This study is reported according to the RECORD checklist (Benchimol et al., 2015).

Study population
The study population was formed of participants who took part in the Scottish Mental Survey in 1947 (n = 70,805) (Scottish Council for Research in Education Mental Survey, 1949).The Scottish Mental Survey 1947 (SMS1947) assessed intelligence of almost all children who were born in Scotland in 1936 and attended a Scottish school on 4th June 1947 (Calvin et al., 2017;Deary et al., 2004).Intelligence was assessed using the Moray House Test No. 12, and information including sex, size of family, and position in the family (e.g.first born child) was also collected (Deary et al., 2004).
Using the participants' Community Health Index (CHI) numbers (a 10-digit identifier recorded in electronic health records), data collected in SMS1947 were linked to electronic health records from later in life.Participants were excluded from the study population when their electronic health records could not be traced (e.g., they may no longer live in Scotland or died prior to the start of follow-up).Follow-up for diagnoses of depression began in 1980-2020.

Data linkage to electronic health records
The SMS1947 cohort were linked to the following electronic health records: General/Acute Inpatient and Day Case (SMR01 -data available from 1980 to 2020), Mental Health Inpatient and Day Case (SMR04data available from 1980 to 2020), the Prescribing Information System (PISdata available from 2006 to 2020 -largely available from 2009), and National Records of Scotland Deaths (1970-2020).Sex was taken from Community Health Index records generated from first contact with an NHS service (usually birth).Data were linked by the eDRIS team (Public Health Scotland) and pseudonymised datasets were provided to researchers for analysis within a Trusted Research Environment.

Outcome
Through linkage of SMS1947 data to electronic health records, we identified whether participants had received a diagnosis of depression after age ~44 years (when electronic health records became available).We searched for diagnoses of depression in 'main' or 'other' conditions in hospital admission records (Scottish Morbidity Records; ICD codes presented in Supplementary Table S1) and for antidepressants that had been prescribed for a minimum period of six consecutive weeks (Prescribing Information System; list of antidepressants presented in Supplementary Table S2).Individuals without a depression hospital admission or antidepressant prescription are defined as 'no depression'.

Environmental factors
Childhood cognitive test scores and childhood family structure (position in the family, size of family) analysed in this study were collected at age 11 (Table 1).Adulthood environmental factors relating to socioeconomic status (SES) and geographical location (living in an urban/ rural environment) were collected at the time of a hospital admission (Table 1 Government, 2020).If a person was prescribed antidepressants within six months of a hospital admission (including non-depression admissions), we included the adulthood environmental factors from the most recent hospital admission in the analyses of antidepressant data.

Statistical analysis
Analyses were conducted using R (Version 4.2.0)(R Core Team.R, 2022).We presented descriptive statistics categorised by sex.Kruskal-Wallis tests were conducted for numeric variables and chi-squared tests were conducted for categorical variables.Prior to including variables in a regression model, we checked multicollinearity between childhood family structure (position in the family, size of family) and adulthood SES and geographical location (Carstairs, urban/rural, SIMD), tested the proportional hazards assumption, checked for influential observations, and checked for non-linearity.Since 'size of family' was non-linear we used the Yeo-Johnson transformation of the variable in the statistical models.Participants were censored at the time of depression diagnosis, at death, or at the end of follow-up in 2020.
A proportion of participants had multiple diagnoses of depression (repeated outcome measure).For each participant, we included all hospital admissions containing a diagnosis of depression and/or the earliest time they had been prescribed antidepressants (for at least six consecutive weeks) in our main analyses.To account for within and between participant variability, and thus random error, we performed mixed-effects models.We performed unadjusted mixed-effects Cox models (coxme package) (Therneau, 2022) to assess the association between childhood factors (intelligence, position in the family, size of family) and adulthood factors (Carstairs, urban/rural, SIMD) and depression in later-life.We then further explored the association between childhood intelligence and later-life depression by adjusting for sex and: (Model 1) childhood family structure (size of family), (Model 2) adulthood SES and geographical location (Carstairs, urban/rural), (Model 3) all risk factors (size of family, Carstairs, urban/rural).Since female sex is a known risk factor for depression, we also stratified the analyses by sex (Cole & Dendukuri, 2003;Hyde & Mezulis, 2020).
Depression identified in hospital admissions records, particularly when depression was the 'main' reason for admission, are likely to reflect more severe cases of depression.We therefore performed two sensitivity analyses which involved: (1) identifying cases of depression using only prescribed drugs data, (2) identifying cases of depression using only hospital admissions data.Following reviewer feedback, we aggregated childhood intelligence test scores into two groups: (1) people who had a very high intelligence test score (i.e., scored in the top 2% of the study sample), (2) people who did not score in the top 2%.This enabled us to understand whether people with a very high level of intelligence were at a lower/higher risk of depression across the follow-up period.We presented our findings in a survival plot.

Ethics
The study was reviewed by an NHS Research Ethics Committee who waived the need for full ethical review of this work (18/SC/0505).

Participant characteristics
70,805 11-year old participants undertook the Moray House Test No. 12 in 1947.17,768/70,805 (25%) participants were excluded from our study because it was not possible to trace their electronic health records, reasons for being unable to trace records include no longer living in Scotland or dying prior to the start of follow-up.Table 2 presents descriptive statistics for the study sample (n = 53,037).Adult SES and geographical location (Carstairs, urban/rural, SIMD) are only available for participants who had a hospital admission (with/without a diagnosis of depression); hence, these variables are missing for those with no hospital admission.

Depression cases
Twenty-seven percent (n = 14,063/53,037) of participants had a diagnosis of depression reported in hospital admissions data and/or had been prescribed antidepressants for a consecutive period of six weeks or more.Most depression diagnoses (n = 11,987/14,063; 85%) were identified using antidepressant prescribing data only (Prescribing Information System) (Fig. 1).Six percent (n = 881/14,063) of depression cases were identified in hospital admissions data only (Scottish Morbidity Records), and 8% (n = 1195/14,063) of participants had been prescribed antidepressants and had a depression diagnosis reported in hospital admission records (Fig. 1).Most depression diagnoses reported in hospital admissions were reported as 'other' diagnoses, rather than the main reasons for admission (Supplementary Fig. S3).This means that a majority of people were admitted to hospital for another physical or mental condition but also had a diagnosis of depression listed as a secondary condition.
We then assessed the correlations between cognitive test score and potential covariates prior to including in the adjusted models.All risk factors were correlated (P < 0.001).As shown in Fig. 2, the most strongly correlated covariates are size of family and position in the family, and, Carstairs and SIMD.We therefore excluded position in the family and SIMD from subsequent multivariable analyses.
When accounting for sex and socioeconomic and geographical factors experienced in adulthood (Carstairs decile, urban/rural classification), a 1SD advantage in childhood intelligence was significantly associated with reduced risk of depression (HR = 0.95, 95% CI = 0.91 to 1.00, P = 0.035) (Table 3, Model 2).As in the unadjusted model, being male (HR = 0.84, 95% CI = 0.77 to 0.92, P < 0.001) was associated with a reduced risk of depression in later-life (Table 3, Model 2).
Model 3 accounted for sex, and childhood family structure and adulthood socioeconomic and geographical factors.Childhood intelligence remained significantly associated with risk of depression (HR = 0.95, 95% CI = 0.91 to 1.00, P = 0.032) (Table 3, Model 3).Male sex was associated with a reduced risk of depression (HR = 0.84, 95% CI = 0.77 to 0.92, P < 0.001).Carstairs score or living in a rural location was not associated with risk of depression.

Sex stratified analyses
Stratifying by sex did not influence findings from unadjusted or adjusted analyses (Supplementary Table S5).The strength of association  between cognitive score at age 11 and depression in later-life was similar in females (HR = 0.94, 95% CI = 0.92 to 0.97, P < 0.001) and males (HR = 0.93, 95% CI = 0.90 to 0.96, P < 0.001) (Supplementary Table S6).This was also true for the other risk factors tested, although significance levels differed between females and males for Carstairs decile and SIMD (Supplementary Table S6).

Sensitivity analyses
When identifying cases of depression using only prescribed drugs data, we did not find any association between cognitive test score at age 11 and depression in later-life (Supplementary Table S7).However, when identifying cases of depression using only hospital admissions data, we found an association between childhood cognitive test score and depression following unadjusted analysis (HR = 0.86, 95% CI = 0.82 to 0.90, P < 0.001), and after adjusting for risk factors in childhood and adulthood (HR = 0.94, 95% CI = 0.89 to 0.99, P = 0.026) (Supplementary Table S8).As visualised in the survival plot (Supplementary Fig. S9), people who had a cognitive test score in the top 2% of the study sample had a lower probability of being diagnosed with depression across the follow-up period.

Discussion
This longitudinal data-linkage study explored the relationship between childhood intelligence and risk of depression in later-life.Greater childhood intelligence was associated with a reduced risk of depression following unadjusted analyses.In addition to the conclusions in Scult et al., 2017, we also provide evidence of an intelligence-depression association which is present at age 11 and not likely to be confounded by concurrent depression symptoms nor by later-life factors such as education.The association between childhood intelligence and depression remained after adjusting for childhood family structure (size of family) and socioeconomic and geographical factors experienced in adulthood (Carstairs, urban/rural classification).In agreement with the existing literature, male sex was consistently associated with a reduced risk of depression across later-life (Hyde & Mezulis, 2020).However, it is important to consider whether this association was due to males being less likely to seek support for mental health concerns.
Our findings differ from those of Wraw et al., 2016, who reported that higher early-life intelligence (between age 15-23) increased the risk of lifetime depression (up to age 50), and this association was strengthened after adjusting for adult SES (OR = 1.32, 95% CI = 1.16 to 1.51) (Wraw et al., 2016).Wraw et al., 2016 were able to look at the independent effects of three adult SES variables: adult educational attainment, income, and occupational status, finding that income was the main facilitator strengthening this association (Wraw et al., 2016).However, their population consisted of people who lived in the United States, and due to cost of health insurance, people with a higher income may be more likely to be able to seek a diagnosis of depression.
When conducting epidemiological research, it is important to consider how defining depression could influence the association between cognitive ability and depression.In addition to measuring risk of lifetime depression (up to age 50), Wraw et al., 2016, also measured depression using the 7-item Centre for Epidemiological Studies Depression Scale (CES-D) (Wraw et al., 2016).Following this analysis, they found that higher early-life intelligence was associated with less CES-depression (Wraw et al., 2016).In our study, we identified cases of depression using hospital admissions data and prescribed drugs data.Our sensitivity analyses found there was no association between childhood intelligence and risk of depression when depression was identified using only prescribed drugs data.Conversely, when depression was identified in hospital admissions data, there was a stronger association between higher childhood intelligence test score and reduced risk of depression in later-life.People who were admitted to hospital with a primary diagnosis of depression are likely to have more severe depression.Yet 65% of the depression diagnoses that were reported in hospital data were recorded as an 'other' reason for admission (Supplementary Fig. 3).As information about severity of depression was not available in the healthcare data, we were unable to explore the association between childhood intelligence and severity of depression.The stronger association between childhood intelligence and depression diagnosed in hospital admissions data could signal an interplay between childhood intelligence, comorbidities (i.e., physical and/or mental health), and risk of depression.However, it is important to highlight that there are many age-related factors that we were not able to consider in our study (e.g., bereavement, loneliness) that may also contribute to an older adult's risk of depression.Due to the availability of data, depression reported in hospital admissions was also identified over a wider age range then depression identified in the Prescribing Information System.Studies that have measured the association between intelligence and depression use heterogeneous methods.Previous studies have used a variety of tools to assess intelligence (e.g., general intelligence, specific cognitive domains), implemented various methods to identify cases of depression (e.g., self-report, interview), and report various effect sizes (e.g., odds ratio, hazards ratio, correlation coefficients) (Scult et al., 2017).One large-scale study of 666,804 Danish men reported that cognitive ability (at mean age of 19 years) was associated with an increased risk of a single depressive episode when followed up for over 50 years, after stratifying by age and adjusting for educational level (Christensen et al., 2018).To enable comparison with our findings, we calculated the inverse hazard ratio for this association (HR i = 0.84, 95% CI i = 0.82 to 0.86).The effect size reported by Christensen et al., 2018 is similar to the size of effect we found when only identifying cases of depression in hospital admissions data (Christensen et al., 2018).
Of the studies which were included in the systematic review by Scult et al., 2017, the largest sample size that assessed intelligence before the age of 18 years was 14,322 participants (mean age:15.98)and the maximum length of follow-up was 45 years (Scult et al., 2017).The longer length of follow-up in our well-powered study enabled us to look at the impact of childhood intelligence on risk of depression in later-life, whilst also exploring how childhood family structure and adulthood socioeconomic and geographical factors influence this relationship.
There are challenges with calculating the prevalence of depression in urban and rural areas.Living in a rural area may make it more difficult to access primary and secondary care for depression.This may lead to a higher prevalence of undiagnosed depression in rural areas which have not been detected in this study.We may have also missed cases of depression when affected people sought alternative treatments for depression (e.g., talking therapy) which are likely to be more easily accessible to those who live in urban areas.In agreement with the findings of our study, a systematic review published in 2019 pooled 18 studies (n = 31,598) and reported that prevalence of depression did not differ between people who lived in rural and urban areas (Purtle et al., 2019).There was also no significant association when the 18 studies were pooled in a meta-analysis (OR = 1.18, 95% CI = 0.84 to 1.65; an OR greater than 1 indicates an association between urban location and depression), however, the studies were highly heterogeneous (I 2 = 93.4%,X 2 = P < 0.001) (Purtle et al., 2019).Our study assessed the association between urban/rural living and risk of depression in a larger sample size but was limited to people living in Scotland.Understanding the interaction between living in an urban or rural area and risk of depression is complex and likely to be influenced by country and culture.

Strengths and limitations
Key strengths of this study are the large sample size and long length of follow-up, combined with access to early-life intelligence, before potential confounding by downstream factors (e.g., education, occupation).The original SMS1947 sample captured almost an entire population of children, regardless of sex or background, and therefore avoids participation bias.Linking to electronic health records is also less resource intensive than following up participants in-person to diagnose depression and limits participant attrition.Nevertheless, people who have not been admitted to hospital, those who have sought alternative treatments (e.g., counselling), or have not sought clinical help will not be captured by our analyses.It has been widely reported that many people living with depression do not seek help; which is pronounced in males (Oliffe et al., 2019).Those admitted to hospital with a 'main' diagnosis of depression likely represent those living with the most severe symptoms, missing those with milder and sub-clinical symptoms.
Data-linkage methods provide a quicker, cheaper, less resource intensive method of identifying people with depression.Due to being unable to access primary care data, where most people are likely to receive a diagnosis of depression, this study is likely to have missed cases of depression (particularly, mild cases of depression).However, we did search for people who were prescribed antidepressants (for the minimum adequate dosage period of six weeks) which should identify further cases of depression.A limitation of using prescribed drugs for identifying people with depression is that antidepressants could have been prescribed for other conditions such as sleep problems, particularly in older age where antidepressant prescribing is common (Percudani et al., 2005).To reduce the likelihood of identifying people prescribed antidepressants for other conditions we searched for prescriptions of antidepressants that have been prescribed for six weeks or longer.
A further limitation is that adulthood socioeconomic and geographical factors were only available for those patients who had a hospital admission, leading to missing data.This could bias our results by only capturing people with depression who have other comorbidities in the models that adjusted for adulthood socioeconomic and geographical factors.We also miss out on potentially important confounders, including education, and personal adulthood SES (e.g., occupation).As follow-up starts in 1980, we do not account for depression outcomes between childhood and mid-life.It is possible that individuals had experienced depression prior to follow-up (i.e., we can't account for history of mental health conditions).Lastly, although the populationwide sample size is large, the most common ethnic group in Scotland is white, therefore, findings may not be representative of other ethnicities and countries (Scotland's Census, 2011).

Conclusions
In one of the largest studies of its kind, we report an association between higher risk for depression in older age and lower intelligence at age 11, when depression is assessed based on hospital admissions records.This risk remained after adjusting for childhood family structure and adulthood socioeconomic and geographical factors.and analysis.ELB led on the analysis of this work.ELB produced the initial draft of this manuscript.All authors provided feedback on the statistical analysis and write up of this manuscript.

Ethical statement
The study was reviewed by an NHS Research Ethics Committee who waived the need for full ethical review of this work (18/SC/0505).

Fig. 1 .
Fig. 1.How many people were identified as having depression in hospital admissions and/or prescribed drugs data?.
interval; HR: hazards ratio; SIMD: Scottish Index of Multiple Deprivation.The number of records included in each statistical model varies because records with missing environmental factors are excluded from the analyses.a Mixed effects model is based on number of observations.b Remote location: Accessible Rural Areas, Remote Rural Areas, Very Remote Rural Areas.
). Adulthood environmental factors were not available at the time that antidepressants were prescribed.Factors (such as the location

Table 1
Description of risk factors.

Table 2
Descriptive statistics relating to the study sample.
P valueMoray House Test score at age ~11 years-old (Variable not age corrected or standardised, max possible score = 76)

died at end of follow-up <0.001
a 8-class scale which has been binarized.b Based on wide-format data table (1 row per participant) n: number; SD: standard deviation;

Table 3
Risk factors associated with depression after unadjusted and adjusted analyses (mixed effect models).