Introduction

Depression is a common mental disorder that is characterized by persistent sadness and a lack of interest or pleasure in previously rewarding or enjoyable activities1,2. Globally, depression is the number one cause of illness and disability for children and adolescents aged 10-18 years3. According to the latest estimates from the WHO, approximately 280 million people in the world have depression, and 14% of 10-19-year-olds experience mental health conditions, yet these remain largely unrecognized4. A survey in India reveals that nearly half of the adolescents are afflicted with depression, 5% of whom suffer from severe depression, 6% of whom experience moderate depression, and 34% of whom experience mild depression5.

According to the DSM-5, depression is characterized by five or more symptoms that persist for at least two weeks, such as feelings of worthlessness, decreased interest in activities, changes in appetite or weight, insomnia, restlessness, and thoughts of suicide or death2. However, owing to the social stigma associated with mental disorders, many students are hesitant to access mental health services, limiting the ability of psychiatrists to diagnose depression6. Therefore, the use of a screening instrument can assist in boosting the rate of mental health assessments among students, thus aiding in the identification and diagnosis of depression before any psychiatric consultation7.

The causes of depression include complex interactions between social, psychological and biological factors. Lifestyle factors, together with socioeconomic factors, have a large impact on mental disorders in children and adolescents8,8,10. However, most studies on depression and lifestyle involve only a few lifestyle factors, and comprehensive analyses of the determinants of depression among children and adolescents are scarce. Therefore, this study randomly selected 32,389 primary and middle school students (from the fourth grade of elementary school to the third grade of high school) who participated in the Students’ Fitness Health Examination (SFHE) in 2019-2020 to explore the associations of socioeconomic status, physical exercise, diet habits, sleep and screen time with the prevalence of depressive symptoms and to determine the importance of those variables by adopting a random forest model.

Method

Study design and population

By adopting a cross-sectional study design, this study was conducted from 2019 to 2020 in China. A total of 32,389 participants (grades 4-12) were randomly recruited from three provinces (Shandong, Chongqing, Guangdong) to complete an online questionnaire under the guidance of regional administrators, physical education teachers and graduate students. Two primary schools, two junior high schools and two senior high schools were randomly chosen from city and rural areas, respectively, in each city, with approximately 120 students (3-4 classes) recruited from each school in each grade. Parents and students provided written consent prior to enrollment in this survey. This study was approved by the Ethics Committee of Shandong Sport University (2022018), and all methods were performed in accordance with the Declaration of Helsinki.

Measurements

Data regarding participants’ depressive symptoms, lifestyles, and family demographics were collected using three questionnaires that were developed collaboratively by a multidisciplinary team of researchers.

Depressive symptoms were measured using the Center for Epidemiological Studies Depression Scale (CES-D), a self-reported, generic measure of depression validated for children and adolescents. The reliability and validity of the Chinese version have been validated and reported previously11. The CES-D questionnaire included 20 items, and each item used a four-point Likert-type scale (ranging from 0 to 3); thus, the total CES-D score ranged from 0 to 60 points, with higher scores indicating a greater probability of depression. CES-D scores greater than or equal to 16 were considered to indicate suspected depression12,12,14, thus individuals with CES-D scores greater than or equal to 16 were considered as the depression group in this study.

The participants’ lifestyles included physical activity and exercise, diet, sleep and screen time. The physical activity level (PA) of the participants was assessed using the International Physical Activity Questionnaire (IPAQ). This questionnaire is a self-reported measure of physical activity and has been used widely in a variety of research studies. The IPAQ was used to calculate the overall physical activity level (MET-min/wk) by using the following equation: 8.0 METs × total duration of vigorous activity + 4.0 METs × total duration of moderate activity + 3.3 METs × total duration of walking15. Exercise included exercise frequency, exercise time, feeling in exercise, days of physical education classes, and muscle strength training frequency. Data on dietary habits, including the frequency of consuming breakfast, milk/soy products, eggs and sugar beverages, were collected. Sleep duration was calculated by asking about the time of getting sleep and getting up in the past month, and time spent napping was obtained via a direct questionnaire. The screen time survey collected the average time spent using electronic devices (watching TV, playing games with mobile phones, tablets, video games, computers, etc., watching videos or e-books, etc.) every weekday and weekend in the past week.

The participants’ socioeconomic factors included residential ___location (urban or rural), parents’ educational level, and whether the participant was the only child of the family.

Statistical analysis

Descriptive analysis was used to describe participants’ demographic characteristics and prevalence of depressive symptoms. The standardized prevalence of depressive symptoms in students with different lifestyles was adjusted for grade, sex, and urban/rural area. Logistic regression was used to explore the associations between individual lifestyles and depressive symptom after adjusting for grade, sex, and urban/rural area, and the effect sizes (odds ratio (OR)) and 95% confidence intervals (95% CIs) were calculated. P values < 0.05 were considered to indicate statistical significance.

Furthermore, machine learning was used to rank variable importance16,17. For comparing model performance, we adopted random forest, artificial neural network, decision tree algorithm, and logistic regression algorithms to develop models in the training set (2/3 participants), and assessed model performance in the validation set (1/3 participants), by using area under the ROC curve (AUC), classification accuracy (ACC), balanced error rate (BER), false positive rate (FPR), positive predictive value (PPV) and negative predictive value (NPV) as the evaluation18. The random forest model performed best (see supplementary Fig. 1 and supplementary Table 2) thus we adopted random forest model to rank variable importance. Imputation method had been extensively applied to account for missing data, by adopting “missForest” package19, and further sensitive analysis were conducted by adjusting for different sets of possible confounders.

SAS statistical software version 9.4 (SAS Institute Inc., Cary, NC) and R 4.2.0 were used in this study.

Results

Among the 32 389 participants, 12 932 (39.93%) had a CES-D score ≥ 16. The prevalence of depressive symptoms was 39.9% (6461/12301) in males and 40.0% (6471/16189) in females, with no significant difference between the sexes (P = 0.870). The prevalence of depressive symptoms increased significantly with increasing grade (P < 0.001), and the prevalence of depressive symptoms was 42.5% (7007/16498) in urban students and 37.3% (5925/15892) in rural students (P < 0.001). The grade-, sex-, rural/urban-specific prevalence of depressive symptoms is shown in Fig. 1, and the baseline characteristics of the study population are shown in Table 1. Students with depressive symptoms had higher grades, lived in the city, had lower parental educational levels, and had unhealthy lifestyles. They performed less exercise and muscle strength training, participated in fewer physical education classes, and had lower metabolic equivalents of physical activity. Students who were depressed tended to skip breakfast, consume fewer eggs and milk/soy products, and consume more sugary drinks. They slept less, took shorter naps, and spent more time watching television (p < 0.05).

Fig. 1
figure 1

Grade-, gender-, rural/urban-specific prevalence of depressive symptoms.

Table 1 General characteristics of the participants.

The crude prevalence and grade-, sex-, rural/urban-adjusted prevalence of depressive symptoms, as well as the logistic regression model, are shown in Table 2. Only children had a lower prevalence of depressive symptoms than non-only children (OR (95%CI) = 0.85 (0.80-0.90), P < 0.001), and a higher parental educational level was a protective factor against depressive symptoms (P < 0.05). An increased number of days participating in exercise, increased duration of exercise per day, increased number of physical education classes per week, and increased total physical activity per day were protective factors against depressive symptoms (P < 0.05). Specifically, children taking muscle strength 5 + times per week had 74% lower risk of depressive symptoms than children do not taking muscle strength (OR (95%CI) = 0.26(0.23-0.29), P < 0.001), indicating the importance of muscle strength in the prevention of mental disorders. A healthy diet and adequate sleep were protective factors against depressive symptoms in students, e,g, children having 10 + hours of sleep had 77% lower risk of depressive symptoms than children having less than 8 h of sleep (OR (95%CI) = 0.23(0.20-0.26), P < 0.001). While the risk of depressive symptoms for children having sugary drinks more than 5 times/week was 2.07 (95%CI = 1.68-2.54, P < 0.001) times than those do not have sugary drinks, and screen time was also a risk factor for depressive symptoms (OR (95%CI) of 60 + minutes vs. <10 min per day = 2.07(1.91-2.25), P < 0.001).The results were almost the same in imputed dataset (results not shown), and robust after adjusting for different confounding variables (see supplementary Table 3).

Table 2 Crude and adjusted prevalence of depressive symptoms for each risk factor and logistic regression results.

Additionally, random forest models were applied to rank the importance of all the variables, and the ten most important factors for depressive symptoms were grade, egg intake, milk/soy product intake, number of muscle strength training sessions, screen time, sleep duration, parents’ educational level, sugar beverage intake and total physical activity (see Fig. 2).

Fig. 2
figure 2

Importance ranking of risk factors for depressive symptoms in children and adolescents.

Discussion

Our analysis revealed that the overall prevalence of depressive symptoms was 39.93% in Chinese primary and middle school students, which was greater than we expected. The questionnaire we used to measure depressive symptoms was CES-D questionnaire, which was a questionnaire used world-wide and had been used successfully across wide age ranges20. The CES-D also provides cutoff scores (e.g., 16 or greater) that aid in identifying individuals at risk for clinical depression, with good sensitivity and specificity and high internal consistency14. One meta-analysis showed that the prevalence of depressive symptoms generally increased over time, and the prevalence estimate was 26.3% (95% CI, 21.9-30.8%) in China among children and adolescents; the prevalence widely varied across studies, ranging from 4.41-55.7%21,22. As depression has been a major public health problem for children and adolescents, more efforts should be made to prevent depression and other mental health issues23. A significant association between lifestyle factors and depressive symptoms was observed in our data, and the ten most important factors for depressive symptoms were grade, egg intake, milk/soy product intake, number of muscle strength training sessions, screen time, sleep duration, parents’ educational level, sugar beverage intake and total physical activity, which indicated that lifestyle factors, including getting adequate sleep, eating a healthy diet, and staying physically active and away from screens, could be potential determinants of depression in children and adolescents2.

Physical activity and exercise have long been considered helpful in promoting mental health24,25. Recent researches have suggested that physical activity may be even more effective in preventing depression in children and adolescents than in adults26,27. In China, the importance of physical activity for mental health has been increasingly recognized, and there is growing evidence that it could have a positive impact on depression in children and adolescents28,29. The mechanism might be that exercise improves mood by enhancing the utilization of neurotransmitters such as 5-HT, dopamine, and norepinephrine30. The results of this study suggested that attention should be given to students who perform infrequent exercise, and it is recommended that schools create a good exercise atmosphere to improve physical health of students for the prevention of depression.

Our analysis revealed that dietary habits play an important role in influencing the prevalence of depressive symptoms. Researches have demonstrated that a healthy diet could help to reduce the risk of depression and anxiety, as well as improve overall mood and cognitive function31,32. Meat, eggs, milk and beans are high-quality proteins that contain relatively high amounts of tryptophan, with 200-455 mg per 100 g33. Moreover, studies have suggested that those who consumed a greater proportion of processed food, such as packaged snacks, fast food, and sweetened drinks, were more likely to be depressed than those who consumed more fresh fruits and vegetables34,35. Animal experiments also showed that large amounts of added sugar could increase anxiety and depressive behaviors as well as cortisol levels, which affected the maturation of the hypothalamic‒pituitary‒adrenal axis, causing disruptions in the stress regulation system and thus increasing the risk of depression35.

Screen time has been linked to a variety of mental health issues, including depression, in children and adolescents36. Studies have shown that the more time children and adolescents spend on screens, the more likely they are to experience depressive symptoms37,38. In China, screen time based behavior is significantly associated with depression risk and the effects vary in different populations37. Furthermore, more screen time might lead to reduced physical activity, social isolation, and sleep deprivation, all of which could increase the risk of depression39.

Additionally, less sleep time could be a risk factor for depression in children and adolescents. Studies have shown that inadequate sleep could lead to an increased risk of depression in both children and adolescents, while an increased duration of sleep has been associated with a decrease in depressive symptoms40,40,42. Thus, it is important for parents and healthcare providers to be aware of the potential effects of inadequate sleep on mental health in children and adolescents and to ensure that they are getting the amount of sleep recommended for their age.

Random forest models were used to rank variable importance in this study as it perform best, after comparing it with other machine learning methods. Because strong correlations between variables existed in this study, random forest model as a machine learning method was adopted as it could handle nonlinear and coassociation problems43. The results of the random forest model showed that the most important determinants for depressive symptoms were grade, diet, exercise, sleep and screen time, which supported the early detection and prevention of depression through behavioral lifestyle surveillance. Therefore, ensuring a balanced lifestyle, healthy eating, enough sleep, time away from screens, and time for physical activity could help reduce the risk of developing depression.

In summary, this research investigated the associations of socioeconomic status, physical activity, sleep and screen time, and diet with depression in children and adolescents by utilizing a large-scale field survey and revealed that surveillance of lifestyles could help early-detection of students with depressive symptom. The limitations of this study included the lack of confidence in defining depression by self-reported scales as well as the lack of causal-effect relationships by adopting a cross-sectional study design. Further research should be conducted through longitudinal studies to gain more insight into the causal effects of lifestyles on the prevention of depression.