Participants and recruitment
ALSPAC is a large prospective cohort which initially recruited 14,541 pregnant mothers living in and around Bristol, England, and due to give birth between 1st April 1991 and 31st December 1992. Of the 14,062 live births, 13,988 children were alive at 1 year. A further 706 pregnant women – individuals who were eligible but failed to enrol in the original recruitment phase – were recruited in subsequent years. This cohort has been described in detail previously [15, 16]. The study website contains details of all available data through a fully searchable data dictionary . The sample in this study consists of the 14,665 singletons and twins alive at one year who had not subsequently withdrawn from the study (Fig. 1).
Ethics approval for the study was obtained from the ALSPAC Ethics and Law Committee and the Local Research Ethics Committee (NHS North Somerset & South Bristol Research Ethics Committee). Full details of ethics committee approval references for ALSPAC can be found online (http://www.bristol.ac.uk/alspac/researchers/research-ethics/). This study was approved by the ALSPAC Executive Committee. Study participants who complete questionnaires consent to the use of their data by approved researchers. Up until age 18 an overarching parental consent was used to indicate parents were happy for their child (the study participant) to take part in ALSPAC. Consent for data collection and use was implied via the written completion and return of questionnaires. Study participants have the right to withdraw their consent for specific elements of the study, or from the study as a whole, at any time.
Screen time use
Screen time was assessed in a study questionnaire administered when the children were aged 16 years. Respondents were asked six questions relating to watching television, computer use, and texting (Additional file 1, section 1). Answers were categorised as less than one hour, one to two hours, and three or more hours per average day and separate responses were collected for weekend and weekday use.
Anxiety and depression
Anxiety and depression were measured at approximately 18 years, using a self-administered, computerised version of the revised Clinical Interview Schedule (CIS-R)  completed during a study clinic. The CIS-R asks questions about a range of symptoms and can be used to assign ICD-10 diagnoses of depression and anxiety disorders [19, 20]. Anxiety and depression were coded as three-level variables categorised as: no anxiety/depression; symptoms but no diagnosis; and diagnosis. For anxiety, symptoms related to general anxiety, phobias, panic and worry; for depression, symptoms related to depression or depressive thoughts. Sleep, concentration and fatigue scores were not used to indicate symptoms of depression due to their lack of specificity [21,22,23]. Earlier depression and anxiety at 7, 10, 13 and 15 years were assessed using the Development and Well-Being Assessment (DAWBA) . At 7, 10 and 13 years, computerised DAWBA questions were completed by the parent of the child, at 15 years the computerised DAWBA questionnaire was self-administered. A computerised algorithm was used to derive ordered categorical variables (with 6 categories) for anxiety and depression, with higher categories indicating increasing levels of symptoms . Due to small numbers in some of the categories, anxiety and depression at 7, 10 and 13 were dichotomised into low (categories 1 and 2) and medium/high (categories 3 to 6); anxiety and depression at 15 were regrouped into low (categories 1 and 2), medium (category 3) and high (categories 4–6).
Previous literature was examined to select potential confounders. These included sex and anxiety/depression measured at age 15 years. Parental covariates were: maternal age at delivery; maternal anxiety measured via questionnaire at seven time points on and after the child was 8 months (these were used to create a single binary variable – maternal anxiety – which was positive if the mother reported anxiety at any time point, no if she reported no anxiety on all occasions, and missing otherwise); maternal depression measured when the child was 8 months using the Edinburgh Post-natal Depression Scale (EPDS) ; maternal education measured during pregnancy and determined by the mother’s highest educational qualification (a 4-level categorical variable, Additional file 1, section 1); and parental socio-economic status (SES). SES was measured when the mothers were 32 weeks pregnant and was based on the higher of the mother or partner’s occupational social class, dichotomised into non-manual (professional, managerial or skilled professions) and manual (partly or unskilled occupations).
Childhood covariates included for further adjustment were: IQ, measured at 8 years using the Wechsler Intelligence Scale for children (WISC-IIIUK) ; parental conflict measured at 8 months; presence of the child’s father in the child’s home measured at 4 years; number of people living in the child’s home measured at 4 years; bullying measured at 16 years; and early family TV use measured at 18 months.
We also adjusted for covariates relating to time spent doing other activities: exercising; on transport; playing outdoors in summer and winter; playing with others; making, drawing and constructing things; being alone; completing home or college work; reading; playing musical instruments; talking on a mobile; and talking on a landline phone.
Further details about these measures including the measurement methods and definitions are available in the supplementary material (Additional file 1, section 1).
Only 1869 participants (12.7% of the overall study sample) had complete data on the outcomes, exposure and covariates, so we used multiple imputation (MI) using chained equations (fully conditional specification)  to address missing data. Logistic regression was used to assess whether earlier depression and anxiety (at 7 years) was associated with missing outcome information after adjustment for covariates to assess whether the outcome data were likely to be missing not at random (MNAR) conditional on the baseline covariates.
The MI models, in which 100 datasets were imputed, included the exposures, outcomes and all covariates listed above as well as auxiliary variables – included to make the missing at random assumption more plausible. These variables included all the earlier measures of depression and anxiety as well as earlier measures of screen use and other activities and additional measures predictive of childhood and parental factors. Further details of the imputation models, including the auxiliary variables, are given in the supplementary material (Additional file 1, section 2 and Table S1).
We assessed the association between screen time, separately for types of device (watching television, computer use, and texting) and timing (weekday or weekend), and anxiety and depression using ordinal logistic regression models. This gave an odds ratio for being in a higher anxiety/depression category for a one unit change in a covariate. The ordinal logistic regression model assumes that the relationship between the lowest category of the outcome and all the higher categories are equal to the relationship between the second lowest category and all the higher categories; a Brant test was conducted to confirm the data did not violate this assumption . Covariates were grouped and added to the unadjusted model (model 1) to examine their effect on the association. Model 2 adjusted for sex, maternal age, anxiety/depression at 15 years, maternal anxiety and depression, maternal education, and parental SES. Model 3 also included IQ, parental conflict, presence of the child’s father, number of people living in the child’s home, bullying, and family TV use in early life. Each of the sub-models of model 4 additionally adjusted for time spent engaging in one other activity on weekdays or weekends (time alone [model 4a], on transport [model 4b], playing outdoors in summer [model 4c], playing outdoors in winter [model 4d], playing with others [model 4e], drawing, making or constructing things [model 4f], exercising [model 4 g], completing school or college work [model 4 h], reading [model 4i], playing musical instruments [model 4j], talking on a mobile phone [model 4 k] and talking on a landline phone [model 4 l]). P-values for the association between types of screen time and anxiety and depression were obtained using a test for linear trend.
We carried out the following sensitivity analyses. Firstly we repeated the above analyses for the complete case sample (n = 1869). Second, because there was evidence that individuals with missing data were more likely to have higher levels of anxiety/depression we carried out a sensitivity analysis in which all individuals with imputed anxiety/depression were re-categorised as one level higher than predicted in each imputed dataset (except when they were already predicted as being in the highest category).
All analyses were carried out in Stata (versions 14 and 15) (Stata Corp LP, College Station, TX USA); MI used the mi impute command.