School achievement as a predictor of depression and self-harm in adolescence: linked education and health record study

Background Mental disorders in children and adolescents have an impact on educational attainment. Aims To examine the temporal association between attainment in education and subsequent diagnosis of depression or self-harm in the teenage years. Method General practitioner, hospital and education records of young people in Wales between 1999 and 2014 were linked and analysed using Cox regression. Results Linked records were available for 652 903 young people and of these 33 498 (5.1%) developed depression and 15 946 (2.4%) self-harmed after the age of 12 but before the age of 20. Young people who developed depression over the study period were more likely to have achieved key stage 1 (age 7 years) but not key stage 2 (age 11) (hazard ratio (HR) = 0.79, 95% CI 0.74–0.84) milestones, indicating that they were declining in academic attainment during primary school. Conversely, those who self-harmed were achieving as well as those who did not self-harm in primary school, but showed a severe decline in their attainment during secondary school (HR = 0.72, 95% CI 0.68–0.78). Conclusions Long-term declining educational attainment in primary and secondary school was associated with development of depression in the teenage years. Self-harm was associated with declining educational attainment during secondary school only. Incorporating information on academic decline with other known risk factors for depression/self-harm (for example stressful life events, parental mental health problems) may improve risk profiling methods.

The prevalence of mental disorders in children and adolescents is estimated at 10-20% worldwide 1 and mostly goes unrecognised and untreated. Moreover, 50% of adult mental disorders starts during or before adolescence 2,3 and therefore, identification of children at risk and prevention or early treatment are essential in order to reduce the later burden of mental illness. Depression and selfharm are the leading causes of disability in adolescents and young adults, and the largest contributor to years lived with disability. 4,5 Recent reports in the UK suggest that service demand among young people in this age group is increasing, with nearly 90% of mental health professionals noting an increase in referrals of both routine and emergency presentations over recent years. 6 Recent media reports suggest the number of children and young people attending accident and emergency departments with mental health conditions has more than doubled since 2009. 7 In addition, the World Health Organization (WHO) survey of health behaviour in school-age children finds UK teenagers among the least happy in the world. 8 Reflecting the concern associated with the social and economic impact of poor mental health, early identification and prevention is a major aim for many governments and health agencies (for example the WHO mental health strategy). For early identification and prevention strategies to be effective they need to be informed by an understanding of how the disorder first develops. Although it is recognised that mental health disorders involve multiple causal factors (social, psychological, family, genetic), several studies have identified low levels of educational attainment as an important association with depression and self-harm during childhood and adolescence. [9][10][11] The link between education and mental health is generally believed to be complex and reciprocal, with academic success giving a strong subjective sense of children feeling good about themselves and being linked to higher levels of well-being in adulthood 12 and poor academic attainment been identified as co-occurring with symptoms. However, studies exploring this issue have been limited in the extent to which they take coexisting problems into account 13 and fewer studies have explored these associations over time. 8 A systematic review examining such longitudinal associations found that depression was associated with poor later school attainment and that associations between depression and school failure were stronger for girls than boys. 14 Authors highlighted a need for further longitudinal research to give greater insight into these associations. Indeed, the measures of mental health and education used vary widely in the literature and the extent to which prior attainment influences the development of both internalising (depression/self-harm) and externalising problems (conduct disorder, attention-deficit disorder) in adolescence is also not yet fully understood. Understanding the strength of these associations through childhood and adolescence has important policy and practice implications; particularly given the UK has high levels of inequalities in educational attainment among children. 15 It may also help inform decisions about which individuals should be targeted for early intervention given that prevention and early intervention programmes for depression show larger effects for indicated (that is targeted at those at increased risk of developing depression) than universal programmes. 16 Although early detection and treatment 17 is known to be beneficial, it is still the case that most depression in adolescence is untreated. The National Institute for Health and Care Excellence guidelines suggest risk profiling in primary care settings including schools. 18 In this study, we set out to examine if educational attainment could be one way of identifying individuals more prone to depression and self-harm. This study aims to examine the temporal link between prior educational attainment and later diagnosis of depression or self-harm. This comparison will examine to what extent educational attainment can help identify individuals with diagnosed depression and reported self-harm after adjusting for socioeconomic deprivation and behavioural problems and their associated medications.

Study population and data-sets
The population we selected from consisted of all children and young people (aged 5-20) born or living in Wales who had at least 1 year in education at school in Wales between the years 1990 to 2014. Education records were linked with mortality data, hospital admissions data and general practice records. The linkage and hosting of this data were through the SAIL (Secure Anonymised Information Linkage) databank. 19,20 The SAIL databank anonymously recordlinks routinely collected data held in health and social care datasets at the Centre for Improvement in Population Health through E-records Research (CIPHER), Swansea University, UK, which is part of the Farr Institute (http://www.farrinstitute.org/). For each data-set within the SAIL databank, an individual is assigned an anonymised linking field (ALF_E), based on their names, addresses or National Health Service (NHS) numbers, which is employed to link across data-sets. All data within the SAIL gateway is treated in accordance with the Data Protection Act 1998. To date, the SAIL databank incorporates over 10 billion records from multiple health and social care events and at the time of analysis, received data from 70% (328/468) of the general practitioner (GP) practices in Wales and all hospital admissions. The education database is available for all children in school between the years 2005 and 2014. Therefore, the study population consisted of children with a GP record (60% of all children in Wales) and linkage to the educational data-set (for example children of school age between the years 2005 and 2014).

Statistical analysis
The SAIL databank was queried using IBM DB2 9.7 SQL. Statistical analyses were conducted using Stata version 13. Exposure was attainment in education at the key stages within the education data-set. Mental health as an outcome was examined through looking at diagnosis and symptom codes for depression and selfharm in GP data in those aged ≥12, 21,22 and confounders examined included a diagnosis of attention-deficit hyperactivity disorder (ADHD) or conduct disorder or intellectual disability (also known at learning disability in UK health services), prescriptions of hypnotics, stimulants and gender (captured from the GP dataset) and socioeconomic status in primary school as measured by free school meal eligibility captured in the educational data-set (see Supplementary Table 1, available at https://doi.org/10.1192/ bjp.2017.96 for the Read codes and ICD-10 codes used to identify diagnosis).
The diagnosis of depression included: single or recurrent major depressive episode and symptom codes for depression such as depressed mood. The diagnosis for self-harm included: selfinflicted, intentional codes and injury undetermined intent codes (see Supplementary File 1). Undetermined intent codes are included as this is what is recommended in the literature because of some suicides being recorded as 'undetermined intent'. 23 In this study 3% of the self-harm cases considered were of 'undetermined intent'. A sensitivity analysis involved fitting separate models for males and females (Supplementary File 2). Results were the same as for the full data-set and we therefore report results from the full sample here.
Outcomes assessed were time to event between the ages of 12 and 20 in the in-patients' data-set and visits to the GP. Analysis was conducted for each outcome separately (Table 1) and Cox regression analysis was used to examine the relationship between academic attainment and outcomes adjusted for confounders (i.e. gender, deprivation, previous attainment, intellectual difficulties and diagnosis of behavioural problems). The follow-up was calculated as time from age 12 to the outcome of interest or censored at date of death or date of end of study. Only children with educational records at the time of interest were analysed and no imputation was undertaken to estimate missing data.
GP data in the UK are coded using Read codes, which contain some 300 000 codes for symptoms, diagnosis, treatment and management. Data within the hospital admission system are recorded using ICD-10 codes. 24 The Read and ICD-10 codes used to identify mental health problem and drugs can be found in Supplementary File 1. The age at depression or self-harm was assumed to be age at first mention in the healthcare record. Individuals with a preexisting diagnosis of depression or self-harm in primary school were excluded (see below) as we were using educational attainment as the exposure to predict future mental health conditions.

Ethical approval
The study design uses anonymised data and therefore the need for ethical approval was waived by the approving institutional review board. The independent Information Governance Review Panel, which contains members from the UK National Health Service Research Ethics Service, approved the study.

Results
There were approximately 1 million children born and subsequently living in Wales between 1 January 1990 and 31 December 2014 (male: 538 181; female: 519 191; unknown gender: 21). Of these, 829 590 could be linked to the education data-set (pre-16 years educational attainment data-set) that was available for children in school between 2005 and 2014. The education database contains the school attainment results. This data-set contains results for; key stage 1 (KS1) that covers national tests in mathematics and English/Welsh language at age 6/7; key stage 2 (KS2) that covers national tests in the core subjects of mathematics, English/Welsh and science at ages 10/11; key stage 3 (KS3) that covers national tests at ages 13/14, including both core and non-core subjects; and key stage 4 (KS4) that covers a range of subjects at age 15/16.
In this linked data-set of 829 590, there were 627 423 (76%) children who were over the age of 5 years (male: 319 839; female: 307 584) and had at least one result in KS1 through to KS4. An individual was considered to have achieved their key stage if they passed mathematics and English/Welsh to the accepted national curriculum level. If they did not achieve the accepted level in the core subjects (mathematics or language (English/Welsh)) they were assigned an overall 'not achieved'.

Depression
There were 33 498 individuals who had a diagnosis/symptoms of depression in adolescence and an additional 605 children who were excluded from the analysis who had depression diagnosed in primary school. These children (with a pre-existing diagnosis of depression) were excluded as we were using educational attainment as the exposure to predict future mental health conditions. Girls were more likely to be diagnosed with depression than boys ( (Table 3). Adjusting for deprivation (free school meal status), ADHD, learning difficulties, conduct disorder, prescription of hypnotic or stimulant in primary school and gender it was found that those who were achieving at KS1 (aged 7) but not at KS2, the end of primary school (i.e. declining in educational attainment during primary school), were more likely to have depression in adolescence. This decline continues, with young people who go on to be diagnosed with depression after the age of 14 being 38% less likely to have achieved their KS3 (before diagnosed with depression) and 50% less likely to have achieved KS4 (when diagnosed with depression after KS4) than those who are not diagnosed with depression (Table 4). Thus, children were declining in school long before a diagnosis of depression. Those with depression in the months before or at the time of their exams/assessment were also 40% less likely to achieve their key stage than those without depression. Deprivation, female gender, conduct disorder (diagnosed in primary school) were also associated with higher risk of future depression and intellectual disability was associated with lower rates of diagnosed depression (Table 3 and Supplementary File 2). Depression is predominantly occurring in the later teenage years and therefore there is a long time lag between poor education attainment in primary school and diagnosis of depression in later adolescence (Table 5).

Self-harm
There were 15 946 (2.4%) individuals with a record of self-harm in adolescence. In addition, there were 692 excluded who had a record  (Table 3). However, they were not achieving as well at age 7 (HR=1.17, 95% CI 1.07-1.29) compared with those who do not self-harm. This suggests (moving from less likely to achieve to equally likely compared with those who do not self-harm) that they were improving and progressing well in primary school. However, a decline is evident during secondary school, where they are 60% less likely to achieve their KS3 and KS4 before there is any record of selfharm (compared with those who do not self-harm). Self-harm in adolescence was also associated with being female and a diagnosis of conduct disorder in primary school and/or ADHD. Young people who self-harm decline in educational attainment before they are diagnosed with self-harm behaviors (HR=1.61, 95% CI 1.45-1.79) ( Table 4). The results show there is a close temporal proximity in the decline in academic attainment and associated self-harm behaviour (Table 5).

Main findings
This study found that the association between educational attainment and depression may differ from the association seen with self-harm. The young people who went on to receive a diagnosis of depression/symptoms of depression were already declining in educational attainment at school for a number of years before the diagnosis was made. The peak period of incidence for depression in this study was 18-19 years but a decline in academic attainment was apparent from primary school and through secondary school (Table 5). However, among those who self-harm there was no evidence of a decline in educational attainment in primary school. In fact, the children who self-harmed in the teenage years were improving in primary school, being less likely to achieve at age 7 (HR=1.17) but just as able at age 11 as those who do not self-harm. The young people who self-harm started declining in education attainment in secondary school almost concurrently with their self-harming behaviour, for example the peak time of self-harm behaviour was aged 15 (Table 5) and this is also the time when these children were not achieving in school (Table 4). This suggests a number of possibilities: that those who self-harm may be well supported in primary school but lose this support in secondary school or perhaps find the transition to secondary school a challenge or that self-harm is associated with a more acute contemporaneous problem occurring in later teenage years (i.e. that academic decline could be a 'symptom' of another problem in those who self-harm).

Comparison with findings from other studies
A survey of 12-to 15-year-olds in school in Australia and the USA found self-harming behaviour to be particularly related to late or completed puberty, girls and self-cutting. 25 The association of self-harm with puberty may be related to a recognised neurodevelopmental stage in adolescents 26 with structural and functional changes associated with increased risk of emotional disorders, risky behaviours and vulnerability to peer pressure that may go some way to explaining the timing of the decline in attainment in those who self-harm compared with those with depression. Various models exist to explain the psychological processes that underlie self-harming behaviours (stress-diathesis; interpersonal model of suicide; motivational-volitional model) 27 and suggest that the degree to which people feel defeated is associated with self-harming behaviours and this may imply a bi-directional mechanism between attainment and self-harm. However, both depression and self-harming are associated with deprivation and are more common in girls and those with conduct disorder/ADHD.

Depression in primary schools
The study results suggest a temporal association between academic attainment and subsequent depression in children and young people. In addition, our study data raises the possibility that depression symptoms and low mood are being missed in primary school, possibly because the adults around them are not recognising their depressive symptoms. Indeed, epidemiological cohort studies illustrate that most depression goes unrecognised and untreated in young people despite the fact that rapid early specialist treatment ameliorates later outcomes. 17,28 Potentially, academic decline or disengagement acts as an early symptom of depression and this may then predict subsequent full-blown episodessubthreshold depressive symptoms predict later major depressive episodes. 29,30 Another possibility is that academic decline may co-occur with other depression risk factors (such as poverty, stressful life events, family adversity) and thereby increase the likelihood of subsequent depression. Indeed, evidence and theory suggest that social and familial risk factors for depression tend to co-occur [31][32][33] and the effects of exposure to multiple risk factors may be cumulative. 34 Self-harm is also associated with adverse family circumstances (abuse, neglect, poor attachment) and such factors are known to have an impact on Table 3 Adjusted hazard ratios for outcomes in adolescence after key stage 2 (KS2) a Depression after KS2 (age 10-11) Hazard ratio (95% CI) n = 626 512 Self-harm after KS2 Hazard ratio (age 10-11) (95% CI) n = 626 553 educational attainment but this would not explain the difference in timing for depression and self-harm.

Implications
This study has important implications suggesting declining academic attainment may be an indicator that interventions aimed at emotional and social development could improve and potentially reduce the development of future mental health problems. Depression occurs through multiple pathways and one route is the 'failure' route whereby social and academic problems affect an individual's self-perceptions and increase vulnerability to depression. 35 It is recognised that depression is a complex multifactorial disorder. This implies different routes to depression for different individuals and indeed, we note that in 6307 (30%) out of 20 759 individuals with depression this was associated with non-achievement of key stage 2 meaning that 70% of those with diagnosed depression did achieve key stage 2. Therefore, academic decline is only one of a number of factors associated with depression. Nonetheless, our longitudinal results suggest that it may be a useful factor to be incorporated into the development of risk profiling/prediction tools in the future. It is plausible that helping children improve their academic attainment and supporting them at an early stage may help protect against future depression.

Strengths and limitations
This study is novel in bringing together education data and health data on a national level to give a large sample that can look at the temporal relationship between academic attainment and depression, and provides a longitudinal cohort of real-world observational data. However, it must be recognised that data was not collected originally for research and this means diagnosis and data collection is not consistent in all periods of time and across all areas. Differences in coding with time and with GP practice will affect prevalence levels of outcomes and confounders with time. Healthcare and education standards change with time, and these changes are not reflected or accounted for in these results. For example, recent changes in mental health awareness and provision of school counsellors in the UK and other interventions will mean children in secondary school in 2014 will have a different experience from those in secondary school in the mid-1990s. This is an observational study and as such the findings would need to be repeated in other populations to confirm validity and repeatability. Importantly, this study did not examine undiagnosed depression or self-harm and so the findings are only relevant to those who present at services with depression or self-harm. This raises an obvious limitation in terms of predicting future events using only diagnosed disease when it is known that the majority of depression in childhood/adolescence is untreated and undiagnosed. Therefore, the strength of  the association of decline in educational attainment at school and depression may be underestimated with this study. In addition, this study does not attempt to look at the severity or length of time a person has depression or have been self-harming. We did not examine how severe the depression is that is associated with educational decline. We did not impute missing data for educational attainment as the available data did not give good estimates of attainment because the data known to be good predictors of child attainment, such as maternal education and mobility, were unavailable. The data-set we were using was large, comprising over 800 000 children and adolescents and it was therefore assumed that the majority of data was missing at random (for example living in England at time of exam) and so we have made the assumption that excluding those with missing education data will not bias the findings. The results of the current study reflect presentation to primary care, recognition by GPs and the way in which depression and self-harm in children and young people is recorded in primary care. However, this is likely to be an underestimation since routine data does not capture individuals with whom depression or selfharm is discussed, but not recorded. This is common feature of all routinely collected database studies.
Finally, children born in the early 1990s will not have their key stage 1 (age 7) and key stage 2 (age 11) records included in the educational data-set, which only started in 2005. Their data will not be included in analysis looking at key stage 1 and 2 but their data will be included in analysis looking at a later key stage where data is captured. Therefore, the later key stage analysis will contain a different mix of children compared with the earlier key stage analysis.
In summary, impaired academic performance precedes overt clinical symptoms of depression. The findings from this study show that this decline may be seen as early as primary school and imply that preventing these children becoming disengaged from the educational system may be critical in modifying the development of mental disorder and, perhaps economic inactivity. 36 The findings from this study suggest either (a) children with depression are not detected in the primary school years and this affects subsequent academic performance, or (b) that prolonged academic decline in the early school years is a risk factor for depression in adolescence or arguably that it is possible that (c) another trait, such as family factors is associated with both the development of depression and academic achievement. In contrast, there was no evidence that academic decline in primary school was associated with future selfharm behaviour although declining attainment in secondary school is associated with self-harm behaviour.