Association of school absence and exclusion with recorded neurodevelopmental disorders, mental disorders, or self-harm: a nationwide, retrospective, electronic cohort study of children and young people in Wales, UK

Summary Background Poor attendance at school, whether due to absenteeism or exclusion, leads to multiple social, educational, and lifelong socioeconomic disadvantages. We aimed to measure the association between a broad range of diagnosed neurodevelopmental and mental disorders and recorded self-harm by the age of 24 years and school attendance and exclusion. Methods In this nationwide, retrospective, electronic cohort study, we drew a cohort from the Welsh Demographic Service Dataset, which included individuals aged 7–16 years (16 years being the school leaving age in the UK) enrolled in state-funded schools in Wales in the academic years 2012/13–2015/16 (between Sept 1, 2012, and Aug 31, 2016). Using the Adolescent Mental Health Data Platform, we linked attendance and exclusion data to national demographic and primary and secondary health-care datasets. We identified all pupils with a recorded diagnosis of neurodevelopmental disorders (ADHD and autism spectrum disorder [ASD]), learning difficulties, conduct disorder, depression, anxiety, eating disorders, alcohol or drugs misuse, bipolar disorder, schizophrenia, other psychotic disorders, or recorded self-harm (our explanatory variables) before the age of 24 years. Outcomes were school absence and exclusion. Generalised estimating equations with exchangeable correlation structures using binomial distribution with the logit link function were used to calculate odds ratios (OR) for absenteeism and exclusion, adjusting for sex, age, and deprivation. Findings School attendance, school exclusion, and health-care data were available for 414 637 pupils (201 789 [48·7%] girls and 212 848 [51·3%] boys; mean age 10·5 years [SD 3·8] on Sept 1, 2012; ethnicity data were not available). Individuals with a record of a neurodevelopmental disorder, mental disorder, or self-harm were more likely to be absent or excluded in any school year than were those without a record. Unadjusted ORs for absences ranged from 2·1 (95% CI 2·0–2·2) for those with neurodevelopmental disorders to 6·6 (4·9–8·3) for those with bipolar disorder. Adjusted ORs (aORs) for absences ranged from 2·0 (1·9–2·1) for those with neurodevelopmental disorders to 5·5 (4·2–7·2) for those with bipolar disorder. Unadjusted ORs for exclusion ranged from 1·7 (1·3–2·2) for those with eating disorders to 22·7 (20·8–24·7) for those with a record of drugs misuse. aORs for exclusion ranged from 1·8 (1·5–2·0) for those with learning difficulties to 11·0 (10·0–12·1) for those with a record of drugs misuse. Interpretation Children and young people up to the age of 24 years with a record of a neurodevelopmental or mental disorder or self-harm before the age of 24 years were more likely to miss school than those without a record. Exclusion or persistent absence are potential indicators of current or future poor mental health that are routinely collected and could be used to target assessment and early intervention. Integrated school-based and health-care strategies to support young peoples' engagement with school life are required. Funding The Medical Research Council, MQ Mental Health Research, and the Economic and Social Research Council. Translation For the Welsh translation of the abstract see Supplementary Materials section.


Introduction
Poor school attendance due to absence (authorised or unauthorised) from available sessions or exclusion (where a headteacher forbids a student to attend for a fixed number of sessions or permanently) leads to multiple immediate and long-term socioeconomic disadvantages.][8][9][10][11] Studies from the UK 12,13 and the USA 14 report an association between neurodevelopmental disorders (ie, ADHD and autism spectrum disorder [ASD]) and self-harm with persistent absenteeism.Similarly, school exclusion appears to be strongly associated with ADHD, ASD, and mental disorders, particularly depression, in UK-based and international studies. 13,15In these mostly cross-sectional studies, diagnoses were assessed by use of questionnaires or interviews.7][18] They also have higher levels of attrition at follow-up [16][17][18] for reasons including impairments affecting the young person or their parent and impacting survey completion or a related absence when surveys are done in a school setting.Furthermore, birth cohort studies often include insufficient numbers of children with mental health conditions to support indepth analysis of rarer conditions.
In this study, we capitalised on electronic linkage between routinely collected primary and secondary health-care data on clinical diagnoses and data on school attendance and exclusions at a population level.Our hypothesis was that school absences and exclusions are associated with a broad range of diagnosed and recorded neurodevelopmental and mental disorders and self-harm by 24 years of age within our cohort of pupils, even after adjusting for sex, age at the start of the academic year, and deprivation.Once established (and previous literature is scarce), this hypothesis would lead to further questions for more detailed study.

Study design and participants
In this nationwide, retrospective, electronic cohort study, we drew our cohort from the 5 341 392 individuals in the Welsh Demographic Service Dataset to include individuals aged 7-16 years (16 years being the school leaving age in the UK) enrolled in state-funded schools in Wales in the academic years 2012/13-2015/16 (between Sept 1, 2012, and Aug 31, 2016) who had primary and secondary care linked data and no conflicting data in the education dataset that pointed to a many-to-one correspondence between the anonymised linkage field and the internal pupil identification number.Ethics approval was granted from the Secure Anonymised Information Linkage (SAIL) Information Governance Review Panel, an independent body consisting of a range of government, regulatory, and professional agencies, in line with ethical permissions already granted to the analysis of data in the SAIL Databank (approval number 0808).

Procedures
We linked data on an individual level via the Adolescent Mental Health Data Platform, an international data platform that supports mental health research in children and young people.For our study, the Adolescent Mental Health Data Platform used datasets from the SAIL Databank, a repository of routinely collected health and education datasets for the population of Wales. 19,20All data are treated in accordance with the Data Protection Act 2018.Individuals within the datasets are assigned a

Research in context
Evidence before this study We searched PubMed for papers published in English between database inception and July, 20, 2021, using the search terms ((children) OR (adolescents)) AND ((school attendance) OR (school absence) OR (exclu*) OR (truan*) or (school disengagement) OR (School Refusal)) AND ((depression) or (anxiety) or (adhd) or (autism) or (learning difficulty) or (schizophrenia) or (bipolar) or (self-harm) or (eating disorder) or (drugs) or (alcohol) or (conduct disorder)).We found 13 small-scale cross-sectional surveys that used questionnaires to assess mental disorders and one national electronic cohort study linking education and secondary healthcare datasets.School absence and exclusion were found to be associated with neurodevelopmental disorders, depression, anxiety, disruptive behaviour, substance misuse, or self-harm, but current evidence is sparse and based on small numbers.

Added value of this study
Our population-based, electronic cohort study was larger than most previous studies, including more than 400 000 pupils, and linked routinely collected primary and secondary healthcare data to educational data.Previous studies have been based on secondary care data only and probably missed disorders, such as anxiety, that are more commonly managed in primary care.Our study encompasses a wide range of clinically diagnosed and recorded mental and neurodevelopmental disorders up to the age of 24 years, and so includes conditions, such as bipolar disorder and schizophrenia, that are less frequently studied in this context are are more often diagnosed in late adolescence and early adulthood.Furthermore, the large size of this study allows for the inclusion of people with less common diagnoses, such as eating disorders.We found strong associations across all disorders and self-harm with absenteeism and exclusion from school.Odds ratios for both outcomes increased with the number of comorbidities and deprivation.

Implications of all the available evidence
Poor attendance affects the educational attainment of children and future social and developmental outcomes.Children with mental or neurodevelopmental disorders or who self-harm are more likely to miss school through absenteeism and exclusion than their peers.Exclusion or persistent absence are potential indicators for current or future poor mental health that are routinely collected and could be used to target assessment and early intervention.
For the SAIL Databank see https://saildatabank.com/ unique anonymised linkage field that replaces any identifiable information, such as names, and enables anonymised linkage across the different datasets.
The datasets in the SAIL Databank that we used were: the Welsh Demographic Service Dataset (a demographics register of people registered with general practitioner [GP] practices in Wales) on Nov 1, 2018; the Office for National Statistics deaths register on March 28, 2019; the Welsh Index of Multiple Deprivation 2011 (an official measure of small area [defined as containing approximately 1500 individuals] deprivation in Wales, based on employment opportunities, income, education, health, community safety, geographical access to services, housing, and the physical environment; quintile 5 represents the most deprived areas) on Nov 1, 2018; the Welsh Longitudinal General Practice Database (on Aug 20, 2018) and the Patient Episode Database for Wales (on Jan 31, 2019), which contain attendance and clinical information for all GP interactions and hospital inpatient and day case activity in Wales, respectively; and the Welsh Government Education Dataset (appendix 2 p 6).The Welsh Government Education Dataset includes records for all children registered at mainstream state schools in Wales or educated in settings other than school.It contains information on attendance, exclusions, eligibility for free school meals, and receipt of a statement of special educational needs (SEN).Attendance records were available from the academic year 2007-08 to the academic year 2015-16.Each school reported, per pupil, the number of authorised and unauthorised absences for that year out of a total number of possible sessions per year.Exclusion records (categorised as permanent, fixed, or lunchtime) were available from the academic year 2012-13 to the academic year 2015-16.A child might have SEN status if they have a learning difficulty or disability (including neurodevelop mental or mental disorders) that requires special education provisions to be made for them. 21e queried primary and secondary care datasets to extract recorded neurodevelopmental and mental disorders and self-harm using code lists from the ICD (version 10) for secondary care and read codes (version 2) 22 in primary care.The codes were collated from published articles and code lists or were compiled in collaboration with clinicians (appendix 2 p 7).Neurodevelopmental disor ders (ie, ASD and ADHD), learning difficulties, and conduct disorder were extracted for our cohort of pupils from their birth until they reached 24 years of age because these conditions often arise early in development and are diagnosed at a young age.Other mental disorders (including depression, anxiety, eating disorders, bipolar disorder, schizophrenia, alcohol misuse, and drugs misuse) or self-harm were extracted for our cohort of pupils between the ages of 10 years and 24 years.We categorised all F ICD-10 codes and E read codes not included in other category code lists, such as those for mania, into the other psychotic disorders category.Each pupil had a flag per each disorder categorised as a binary variable (recorded present or absent).The age at first diagnosis was extracted for each pupil and disorder.Where a pupil could not be linked to primary or secondary care datasets, this was flagged as linked or unlinked.
We extracted SEN status for each pupil as a binary variable (present vs absent) to understand the extent to which it, in addition to a disorder, affected outcomes.We counted the number of morbidities per person to assess the effect of comorbidities (defined as two or more of the studied disorders recorded for the same individual, not necessarily concurrently).

Outcomes
We defined absenteeism as a binary variable, categorised as 1 when a pupil missed more than 10% of sessions in 1 year and categorised as 0 otherwise.The choice of 10% was based on a report from Estyn (the quality inspectorate of education in Wales), which described that, of pupils who were absent for more than 10% of sessions, fewer than 80% achieved the level expected of them by age 11 years in mathematics, science, and either English or Welsh as a first language and fewer than 40% achieved level 2 (equivalent to five GCSEs at grades A*-C) at 16 years of age. 23,2410% is the level used in England to define persistent absenteeism, 25 although the level used in Wales is 20%. 26Exclusion (a record of any type of exclusion in a specific academic year) was also categorised as a binary variable (yes vs no).

Statistical analysis
Data were retrieved from the SAIL Databank by use of IBM DB2 9.7 SQL.Statistical analysis was done by use of R (version 3.3.3),accessed through RStudio (version 1.2).We analysed the association between the outcome variables (absenteeism and exclusion) and the existence of a record of each neurodevelopmental or mental disorder and self-harm, up to 24 years of age, using generalised estimating equations (R library geepack). 27eneralised estimating equations with exchangeable correlation structures using binomial distribution with the logit link function were used to calculate odds ratios (OR) for absenteeism and exclusion, adjusting for sex, age at the beginning of the academic year, and deprivation.We used a long data format with one row per pupil and year.The experimental unit (id) was the pupil, and the repeated measurements were ordered by academic year (wave).95% CIs for proportions and percentages were estimated by the Wilson score method with continuity correction.We did not explore causality; therefore, the time dependence of measurements per person (up to four measurements at different academic years) was modelled with a correlation function as a source of variance, which was marginalised over so that the variance of the estimated covariates were calculated efficiently. 28We used an exchangeable correlation structure, in which any two measurements for the same pupil had the same correlation.We analysed each See Online for appendix 2 recorded disorder sep arately using a sub-cohort consisting of those presenting with these disorders together with pupils in our cohort with no record of any of these disorders (our controls).We tested multiple models, sequentially adding age (week of birth), sex (male vs female), and deprivation quintile (quintile 5 representing the most deprived) as covariates. 29,30We tested the goodness of fit for each of these models by calculating the Quasi-likelihood model information criteria. 31We stratified the population by condition and analysed the association between the outcome variables and sex, age, and deprivation separately.For the main analysis, we pooled pupils with ADHD and ASD (under neurodevelopmental disorder) and pooled pupils with depression, anxiety, eating disorders, schizophrenia, bipolar disorder, and other psychotic disorders (under any mental disorder).
In the first sensitivity analysis, we ran the main analysis on both the subgroup that had linked healthcare data and the full dataset.Neurodevelopmental and mental disorders typically show comorbidity over the life course.We assessed the sensitivity of our analysis to comorbidities by conducting three extra sensitivity analyses.First, we compared the model results between those with one morbidity and those without any of the morbidities studied.Second, we compared the model results between those with more than one morbidity and those without any of the morbidities studied.Finally, separately, we ran the model with the number of comorbidities as a covariate.
We conducted several other sensitivity analyses.For some children, certain types of mental disorders are an entry point for SEN status within the education system.We assessed sensitivity to SEN status by exploring the interaction between any of the disorders studied and SEN status.We also ran our models in the subpopulation of participants first diagnosed or with their first record before 17 years of age (ie, while of school age).Furthermore, we compared individual-level yearly rates of absences (number of sessions absent/total number of possible sessions per year) for those excluded versus for those not excluded and calculated the Pearson correlation coefficient between individual-level yearly rates of absences and individual-level yearly rates of exclusions.

Role of the funding source
The funders of the study had no role in study design, data collection, data analysis, data interpretation, or writing of the report.

Results
437 412 individuals had education and demographic data and were aged 7-16 years during the 2013-16 academic years, of whom 213 816 (48•9%) were female and 223 596 (51•1%) were male (figure 1).Of these 437 412 individuals, 22 775 (5•2%) had no linked hospital or primary care records.We considered health data for these individuals as missing at random because missingness was not based on health or education status.
In the group with health-care data, 212 848 (51•3%) of 414 637 pupils were boys and 201 789 (48•7%) were girls (appendix 2 p 1).In the group without health-care data, 10 748 (47•2%) of 22 775 pupils were boys and 12 027 (52•8%) were girls (appendix 2 p 1).Compared with those with health-care data, a higher proportion of individuals with missing health-care data resided in quintile 2 areas on the Welsh Index of Multiple Deprivation and a lower pro portion resided in quintile 5 areas (appendix 2 p 1).We repeated the main analysis in the group with linked primary and secondary health-care data (n=414 637) and in the larger group (n=437 412).Results were equivalent (appendix 2 pp 25-26) so we removed those without linked health-care data from all main and other sensitivity analyses (list-wise deletion).Each pupil contributed 1-4 years of data.The distribution of morbidity, sex, and deprivation by number of years of data contributed is shown in appendix 2 (pp 2-4).Demographics and mor bidity were not correlated with the number of years of data contributed so we also viewed this as missing at random.
Of the 414 637 pupils with primary and secondary care data comprising our study population, 201 789 (48•7%) were female and 212 848 (51•3%) were male.Their mean age on Sept 1, 2012, was 10•5 years (SD 3•8).Ethnicity data were not available.57 930 (14•0%) pupils had at least one of the disorders studied (a neurodevelopmental or mental disorder or a record of selfharm) by the age of 24 years, and 42 734 (10 The proportion of absentee pupils with no record of any of the disorders studied remained stable in primary school (7-11-year-olds) at around 12•5% and increased in secondary school (11-16-year-olds) to around 18% for 16-year-olds (figure 2).For the raw counts used to create figure 2, please see the appendix (pp 16-20).Across all ages, a higher proportion of pupils with a neurodevelopmental disorder, mental disorder, or self-harm record were absent from school compared with pupils without a record (figure 2).In the last 2 years of primary school (10-11-year-olds), pupils with a sub sequent diagnosis of schizophrenia or drugs misuse had the highest rate of absenteeism at around 30-33% (figure 2).In the last 2 years of secondary school (ages 15-16 years), pupils with a record of bipolar disorder, schizophrenia, alcohol misuse, drugs misuse, or self-harm had the highest rate of absenteeism at around 40-55% (figure 2).
Of those with a record of neurodevelopmental disorders, learning difficulties, conduct disorder, depression, other psychotic disorders, or drugs or alcohol misuse, boys were less likely to be absent than were girls (appendix 2 p 9).For those with a record of anxiety, eating disorders, bipolar disorder, schizophrenia, or self-harm, sex was not significantly associated with absenteeism (appendix 2 p 9).For pupils with a record of neuro developmental disorders, conduct disorder, depression, anxiety, eating disorders, drugs or alcohol misuse, or self-harm, age was associated with absenteeism, with slight increases in ORs per year (appendix 2 p 9).The sample sizes for bipolar disorder and schizophrenia were too small to assess the association of deprivation quintile with absenteeism; however, the odds of being absent increased with increased deprivation (5th vs 1st quintile) for all other variables apart from other psychotic disorders, ranging from 1•5 (95% CI  3).The proportion of pupils with severe mental illness who were excluded was also high, with 16 (17•4%) of 92 with bipolar disorder excluded at age 15 years and 16 (18•4%) of 87 with schizophrenia excluded at age 14 years (figure 3).For the raw counts used to create figure 3, please see the appendix (pp 21-24).
Goodness-of-fit tests (appendix 2 p 27) again showed that including sex, age, and deprivation as covariates sequentially improved model fit.Having a neurodevelopmental disorder, a mental disorder, or a record of self-harm were all associated with being excluded from school (table 2).After adjusting for sex, age, and deprivation, pupils with a record of drugs misuse had the highest odds of being excluded (table 2).To note, alcohol misuse, self-harm, schizophrenia, and bipolar disorder also had high aORs (table 2).
Across disorders, apart from bipolar disorder, boys were significantly more likely to be excluded than were girls (appendix 2 p 13).Boys with a record of learning difficulties, anxiety, eating disorders, schizo phrenia, other psychotic disorders, or self-harm had an OR for being excluded between 2 and 3 (appendix 2 p 13).Being older was associated with a higher odds of exclusion for individuals with a record of most variables studied (OR range 1•09-1•19), except for bipolar disorder, schizophrenia, other psychotic disorders, drugs misuse, and alcohol misuse (appendix 2 p 13).The sample sizes for bipolar disorder and schizophrenia were too small to assess the association of deprivation quintile with exclusion; however, the odds of exclusion were higher in the most deprived areas than in the least deprived areas for all variables apart from other psychotic disorders, with the OR varying from 1•4 (95% CI 1•1-1•9) for those with conduct disorder to 3•3 (2•7-4•0) for those with anxiety (appendix 2 p 13).
Pupils in our cohort had up to eight morbidities in total.41 018 had one mor bidity, 12 096 had two, 3495 had three, and 1321 had four or more (appendix 2 p 10).Absenteeism was more likely in pupils with comorbidities than in pupils with one morbidity, except in the case of bipolar disorder (table 1).Pupils with a single diagnosis of an eating disorder, schizophrenia, or other psychotic disorder were not at higher risk of being absent compared with their healthy peers (table 1).When the number of comorbidities was modelled as a covariate, the OR of being absent was between 1•2 and 1•4 for each additional comorbidity, except for bipolar disorder for which the OR was 1•0 (appendix 2 p 11).SEN status did not reduce the ORs for being absent in those with anxiety, eating disorders, schizophrenia, or alcohol misuse (appendix 2 p 12).For those with ADHD, ASD, learning difficulties, conduct disorder, depression, bipolar disorder, drugs misuse, other psychotic disorders, or a record of selfharm, having SEN status reduced the OR for absenteeism to 0•59-0•89 compared with not having SEN status (appendix 2 p 12).The results for pupils with a record before 17 years of age were similar to those of the main cohort, except for pupils with a record of alcohol or drugs misuse, bipolar disorder, or depression who had slightly higher odds of being absent, and for pupils with schizophrenia who had slightly lower odds (table 1).
In the group of pupils with more than one morbidity, aORs for being excluded were consistently higher than for those with one morbidity (table 2).When the number of comorbidities was modelled as a covariate, the OR of being excluded was between 1•2 and 1•8 per each additional comorbidity (appendix 2 p 14). SEN status was associated with decreasing ORs for being excluded for those with neurodevelopmental disorders, conduct disorder, depression, bipolar disorder, other psychotic disorders, drugs misuse, and self-harm (appendix 2 p 15). aORs for being excluded differed between the subpopulation diagnosed while at school and the main cohort, depending on the variable (table 2).Of note, there was little difference for neurodevelopmental disorders, the aOR for exclusion was lower for people with schizophrenia when diagnosed while at school, and the aORs for exclusion were somewhat higher for individuals with drugs or alcohol misuse recorded while of school age (table 2).
The individual-level yearly absence rate (number of sessions missed/total number of possible sessions per year) was higher in the group with a record of exclusion than in the group without a record of exclusion (appendix 2 p 5).The correlation between individuallevel yearly absence rates and individual-level yearly exclusion rates was r=0•17 in the full cohort and r=0•35 for those with recorded exclusions.

Discussion
Our study, which involved more than 400 000 pupils, highlights that children and young people diagnosed with a neuro developmental disorder or mental disorder, or who have a record of self-harm, before 24 years of age are much more likely to miss school than their peers, even after adjusting for age, sex, and deprivation.Our data and study size enabled us to include disorders typically not included in studies of school-aged children, such as rare disorders and disorders that typically present after individuals have left school (eg, schizophrenia), that might confer antecedent clinical vulnerabilities. 32School absenteeism and exclusion rates were higher after 11 years of age for all children but disproportionally more so in those with a record of a disorder or self-harm, even if it was recorded during school age.This finding could reflect a reduced direct influence of parents on older children's attendance or the smaller size of primary schools compared with secondary schools.Generally, individuals with more than one recorded morbidity were more likely to be absent or excluded than were those with only one morbidity, which was exacerbated with each additional disorder.Within the diagnosed populations, M Self-harm girls with neurodevelopmental disorders, learning difficulties, conduct disorder, depression, other psychotic disorders, or drugs or alcohol misuse were more likely to be absent than were boys, and boys were more likely to be excluded than were girls across all studied disorders apart from bipolar disorder.This finding aligns with the view that boys externalise mental distress through their behaviour, which in turn impacts the school environment and results in their exclusion, whereas girls, and especially those with emotional disorders or delayed diagnosis of neurodevelopmental disorders, tend to be more anxious and withdraw from social contact. 32Age was found to be associated with both outcomes in relation to most disorders.We also found associations between both outcomes and deprivation within most disorders studied.Having SEN status reduced the likelihood of being absent or excluded, most notably for those with records of neurodevelopmental disorders or bipolar disorder, compared with those with a record but no SEN status, potentially highlighting the positive impact of recognition, diagnosis, and educational interventions.
Our findings strengthen those found previously in much smaller population-based studies.In the ALSPAC study 29 of a UK birth cohort, by 8 years of age, 19% of children with ADHD and 31% of those with conduct disorder were excluded from school compared with 1•9% and 2•8% of those without ADHD or conduct disorder, respectively.In another study of a UK cohort (BCAMHS), 30 psychiatric symptoms (assessed through validated questionnaires) were a significant predictor of exclusions.
Our study is based on routinely collected data encompassing a wide range of clinically diagnosed and recorded disorders.It benefits from well documented, often validated, and curated lists of ICD-10 and read (version 2) codes to ascertain each of the disorders.Arguably, diagnoses made by clinicians for those in contact with services provide more complete case ascertainment than do surveys or cohort studies, which are susceptible to selection bias due to low recruitment and high attrition in populations with psychiatric disorders.However, a common feature of all database studies of routinely collected data is the underestimation of the number of disorders in the population as not all those affected consult their GP, or conditions might not be recognised or recorded. 33Additionally, there is no validated measure of the clinical problems recorded, which prevents any estimation of severity, and administrative data are vulnerable to random errors in data entry.This study's novelty lies in its linkage of education, health (including primary care), and deprivation datasets for a whole population (Wales) at an individual pupil level over 4 school years for a wide range of disorders.Linking health and education data on this scale allows us to gain valuable insights on the education of children with neurodevelopmental disorders, mental health disorders, or self-harm.Because many older adolescents with common mental disorders are managed in primary care, it is important to include this data source.A whole population dataset enabled us to include pupils with rarer conditions such as schizophrenia and bipolar disorder.Linking diagnoses up to the age of 24 years allowed for assessment of conditions more frequently diagnosed after school leaving age (eg, schizophrenia), for which their antecedents or premorbid presentation, such as cognitive or social deficits, apathy, or selfmedication with drugs, might affect attendance and exclusion.We did not take physical comorbidities into account, although we note the strong association between poor mental and physical health, 34 because some absences would have been due to physical morbidity and medication rather than the mental or neurodevelopmental disorder, which would have complicated the interpretation of our findings.
Our estimates might underestimate the effect of mental health difficulties on exclusions and absenteeism.Younger children will have had less time for evidence of their diagnosis to be recorded, especially for those conditions that tend to appear later in adolescence, and some young people who are diagnosable will not present to services.There is some evidence 30 to suggest that, for each diagnosed child, there could be a number that have multiple symptoms but do not meet the criteria for a diagnosis.These children might well have issues at school that could lead to poor attendance or exclusion.Some children, especially those with ADHD, ASD, or learning difficulties, might not have been included in our dataset because they are in schools for children with special educational or behavioural needs or are homeschooled.Different pupils contributed different numbers of years to the analysis.We are satisfied that there were no demographic or mental health-related differences between these pupils.5•2% of pupils with education data in the 2013-16 academic years did not have any linked health data and were removed from our analyses.
There are various processes through which school attendance might be associated with neurodevelopmental disorders, mental disorders, and self-harm.These processes include disruptive behaviours resulting in exclusion, physical comorbidities or somatic symptoms (eg, stomach pain and headaches) leading to authorised absence, symptoms associated with anxiety and depression leading to school refusal, family problems, and peer problems (eg, bullying).If absence from school results in social isolation and poorer academic performance, it could exacerbate mental health and attendance issues if the cycle is not disrupted.Our study cannot infer causal relationships and further research should focus on the direction of the association, which could be bidirectional for individual disorders and outcomes.Clinical record data might not be ideal to use in these future studies because the documentation in clinical records will not represent an accurate measure of the time of first onset of the symptoms or disorder.However, even without an understanding of the direction or mechanisms of the association, the demonstration of an association using real life outcomes and data is important.
Poor school attendance affects the educational attainment of children and future social, developmental, employment, and physical health outcomes.Many governments, including UK Governments, have recognised the importance of regular school attendance and have issued related guidelines, which include penalty notices for the carers or parents of persistently absent children and the use of incentives to encourage high attendance. 35Exclusions from schools in England and Wales are intended to be used in serious breaches of behaviour policies-for violence, sexual abuse, the supply of illegal drugs, or the use of weapons. 36,37urrently, rates of exclusion in England are rising, raising concerns about school-based policies to improve behaviour and support teachers.Similar initiatives are in place in the USA and elsewhere. 38inking routinely collected health and education data has the potential to improve services for children 39 by identifying those in need, alongside gaps in provision.Our analysis clearly shows that children with neurodevelopmental disorders, mental disorders, and selfharm spend less time at school.As such, exclusion or persistent absence is a potential indicator for current or future poor mental health that is routinely collected by schools and local education authorities and could be used to target assessment and early intervention. 40There is growing interest in school-based prevention and early intervention programmes that focus on improving the school climate for reducing adolescent mental health problems, 41,42 which has relevance now as children return to school following closures and blended learning in response to the COVID-19 pandemic.Other interventions have included psychological interventions that focus primarily on anxiety and depression symptoms. 43Schoolbased mental health provision and integration with mental health services has been highlighted as a major strategic priority in the UK. 44This approach could benefit young people, as supported by our finding that having a SEN status decreases the odds of being absent or excluded, even if it does not remove the risk completely.Attendance and exclusion data, which are already collected by schools, could provide useful information about where to focus sparse resources.School-based mental health prevention strategies might also help to build resilience, enabling pupils to develop strategies for managing and improving their mental health and wellbeing, and to understand when and how to seek additional help.
Future research could further explore whether improvements in school attendance over time serve to reduce the incidence of mental disorders and whether the timing of diagnosis is an important factor in the risk for absenteeism or exclusions.This can be done by looking at causal relationships between mental health and school outcomes using a longer follow-up period.Other avenues for research include evaluating the effect of physical comorbidities on school outcomes and the differential associations of pairs of disorders with school outcomes.
To conclude, people up to 24 years of age who have mental or neurodevelopmental disorders or self-harm have poorer attendance at school than their peers who do not have disorders or self-harm.Exclusion or persistent absence is a potential indicator of current or future poor mental health that is routinely collected by schools and local education authorities and could be used to target assessment and early intervention.

Contributors
AJ conceived the study.AJ, YF, AT, and TF designed the study.YF, AF, and MD-B accessed and verified the data.YF did the analysis under AJ's supervision.AJ and YF produced the first draft of the manuscript.All authors commented on the manuscript.All authors had full access to all the data in the study and had final responsibility for the decision to submit for publication.

Declaration of interests
AJ is a trustee of the Samaritans.All other authors declare no competing interests.

Data sharing
The data used in this study are available in the SAIL Databank at Swansea University (Swansea, UK) via the Adolescent Mental Health Data Platform, but, as restrictions apply, they are not publicly available.All proposals to use SAIL data are subject to review by an independent Information Governance Review Panel.Before any data can be accessed, approval must be given by the Information Governance Review Panel.The Information Governance Review Panel carefully considers each project to ensure proper and appropriate use of SAIL data.When access has been granted, it is gained through a privacyprotecting safe haven and remote access system referred to as the SAIL Gateway.SAIL have established an application process to be followed by anyone who would like to access data via SAIL, details of which can be found at https://www.saildatabank.com/applicationprocess. Derived data supporting the findings of this study are available from the corresponding author (AJ) on request at a.john@ swansea.ac.uk.

Figure 2 :
Figure 2: Proportion of absenteeism stratified by diagnosis and age (A) ADHD.(B) ASD.(C) Learning difficulties.(D) Conduct disorder.(E) Depression.(F) Anxiety.(G) Eating disorders.(H) Bipolar disorder.(I) Schizophrenia.(J) Other psychotic disorders.(K) Drugs misuse.(L) Alcohol misuse.(M) Self-harm.Ages represent a birthday during a school year (16th birthday during the last academic year of school).The error bars represent 95% CIs for proportions.The vertical line marks the transition from primary school to secondary school.ASD=autism spectrum disorder.

Figure 3 :
Figure 3: Proportion of exclusions stratified by diagnosis and age (A) ADHD.(B) ASD.(C) Learning difficulties.(D) Conduct disorder.(E) Depression.(F) Anxiety.(G) Eating disorders.(H) Bipolar disorder.(I) Schizophrenia.(J) Other psychotic disorders.(K) Drugs misuse.(L) Alcohol misuse.(M) Self-harm.Ages represent a birthday during a school year (16th birthday during the last academic year of school).The error bars represent 95% CIs for proportions.The vertical line marks the transition from primary school to secondary school.ASD=autism spectrum disorder.

1: Flow diagram of cohort selection
•3%) while of school age.356 707 (86•0%) of 414 637 individuals had no record of self-harm or any of the disorders studied.The numbers of diagnosed individuals, age at first diagnosis, and SEN status before 17 years of age are detailed in appendix 2 (p 7).