Does Education Influence Life-Course Depression in Middle-Aged and Elderly in China? Evidence from the China Health and Retirement Longitudinal Study (CHARLS)

Mental health problems have become a major public health problem worldwide and are more common among middle-aged and elderly people in China. Research on the effect of education on depression is limited, and whether the relationship between education and depression changes over the life course remains unclear. This study was based on the cross-sectional data of 15,767 middle-aged and elderly individuals in the 2018 tracking survey (Wave 4) of the China Health and Retirement Longitudinal Study (CHARLS) database. Multiple linear regression and bootstrap methods were developed to detect the mediating effect of education on depression. In all samples or different age groups, education was significantly positively associated with depression. Three mediators (economic level, health-related lifestyle, and cognitive level) were significantly positively associated with depression, and cognitive level had a greater effect on depression than economic level and health-related lifestyle. The total, direct, and indirect effects of the whole samples and elderly samples were significant; however, the direct effect of the middle-aged samples was insignificant, and the total and indirect effects of the three mediating pathways were all significant, that is, economic level, health-related lifestyle, and cognitive level should produce complete mediation. The multiple linear regression and bootstrap methods could successfully detect the mediating effect of education on depression. On the basis of the education, economic level, health-related lifestyle, cognitive level, and depression of middle-aged and elderly people, we established and compared the total, direct, and mediating effects of education on depression under the life course. The mediating variables should be further increased, and the measurement methods of depression should be developed to improve the credibility of the research results.


Introduction
Mental health problems have become a major public health problem worldwide, and according to the World Health Organisation (WHO) [1], the bulk of the global health burden can be attributed to non-psychiatric illnesses and common mental disorders, such as depression and anxiety. Depression is more common among middle-aged and elderly people in China, with 4.1% and 3.8% of people aged 50-64 and 65 years old, respectively, which are higher than 3.6% and 3.1% of people aged 18-34 and 35-49, respectively. Some studies have found that depression is closely related to many adverse outcomes, and it also brings a heavy medical burden to families and society [2,3]. According to Fan et al. [4], mental illnesses, such as depression, account for more than 20% of the total medical expenses in China. Given the age-related characteristics of depression prevalence and disease manifestations, a series of threats to mental health may expand under the rapidly ageing population in China.
The financial rewards of education have been widely demonstrated by a large number of researchers, and research on the effect of education on health is limited [5]. More recently, several studies have found that education also plays an important role in improving people's physical health [6,7]. However, as an important dimension for measuring health, mental health has not been fully explored. Some studies have shown higher rates of psychological distress among people with low levels of education, confirming the important relationship between education and depression [8,9]. Some studies have also reported that economic status, lifestyle, and self-efficacy are important mediators between education and depression [10,11]. However, few studies have explored the role of the above mediating variables, and the current research conclusions have not reached a consensus. In addition, whether the relationship between education and depression changes over the life course remains unclear. Some research results only exist at the theoretical level, and the relevant empirical conclusions are inconsistent [12,13]. However, there exist significant differences in the influence of education on health at different ages, and further research is needed on the influence of education on depression in the life course.
Several studies have analysed the association between depression and its factors, which mainly include the following types of indicators: (1) demographic characteristics, such as sex [14], age [15], marital status [16], education [17], place of residence [18], ethnicity [19], and religious belief [20]; (2) economic level, such as personal income [21] and household income [22]; (3) health-related lifestyle, including smoking [23], alcohol consumption [24], social activities [25], physical exercise [26], and taking a nap after lunch [27]; and (4) cognition level, including episodic memory [28] and mental status [29]. However, most studies have only analysed the influence of education on depression from one or several of the above factors, and more comprehensive comparative studies for all factors are lacking [17][18][19][20][21][22][23][24][25][26][27][30][31][32]. Moreover, systematic research on the analysis of the mediating effect of education on depression is lacking, and the available approach only analyses the proportion of each influencing channel and channel in the process of education affecting depression and does not establish a mediation effect model for each mediating variable.
To the best of our knowledge, no previous study has used a mediation effect model combined with longitudinal data to analyse the influence of education on depression and its mediating mechanism from the perspective of life course. Therefore, this study utilises survey data from the China Health and Retirement Longitudinal Study (CHARLS) as a sample to analyse the influence of education on depression and its mediating mechanism from the perspective of life course by using a mediation effect model.

Data Resource
The data used in this study are derived from the 2018 tracking survey (Wave 4) of CHARLS. The CHARLS survey collects a set of high-quality microdata representing families and individuals aged 45 years and older in China to analyse the ageing Chinese population and promote interdisciplinary research on ageing. The CHARLS questionnaire includes demographic backgrounds, family structure and financial support, health status and functioning, healthcare and insurance, work, retirement and pension, income, expenditures and assets, and housing characteristics. The questionnaire design draws on international experience, including the Health and Retirement Study; the English Longitudinal Study of Ageing; and the Survey of Health, Ageing and Retirement in Europe. The project adopted multistage sampling, and probability proportionate to size sampling methods were adopted in the county/district and village sampling stages. CHARLS pioneered the electronic drawing software (CHARLS-GIS) technology and used the map method to create village-level sampling frames . The CHARLS baseline survey was launched in 2011  and covered 150 county-level units, 450 village-level units, and 17,708 individuals from  10,257 households in 28 provinces, municipalities, and autonomous regions (Table 1). Generally, the CHARLS baseline is a good representation of the elderly population of China. Sampling is conducted every 2-3 years, the latest tracking survey of CHARLS was conducted and published in 2018, and the fifth of survey data in 2021 has not yet been released. Counting the refresher samples and age-eligible respondents who failed to be found in the baseline but were successfully contacted in the follow-up waves shows that the total number of individuals (main respondents plus spouses) has increased from 17,708 in Wave 1 to 19,817 in Wave 4.
In this study, 19,744 observations were admitted from the CHARLS database in Wave 4. After selection, the remaining 15,767 observations were used in this paper. The specific sample selection process is shown in Figure 1. project adopted multistage sampling, and probability proportionate to size sampling methods were adopted in the county/district and village sampling stages. CHARLS pioneered the electronic drawing software (CHARLS-GIS) technology and used the map method to create village-level sampling frames. The CHARLS baseline survey was launched in 2011 and covered 150 county-level units, 450 village-level units, and 17,708 individuals from 10,257 households in 28 provinces, municipalities, and autonomous regions (Table 1). Generally, the CHARLS baseline is a good representation of the elderly population of China. Sampling is conducted every 2-3 years, the latest tracking survey of CHARLS was conducted and published in 2018, and the fifth of survey data in 2021 has not yet been released. Counting the refresher samples and age-eligible respondents who failed to be found in the baseline but were successfully contacted in the follow-up waves shows that the total number of individuals (main respondents plus spouses) has increased from 17,708 in Wave 1 to 19,817 in Wave 4.
In this study, 19,744 observations were admitted from the CHARLS database in Wave 4. After selection, the remaining 15,767 observations were used in this paper. The specific sample selection process is shown in Figure 1.

Theoretical Framework
On the basis of some research results, this study proposed a theoretical framework. We believe that education has a significant effect on depression, and this influence is mainly transmitted through three types of factors represented by economic level, lifestyle, and cognitive level. This relationship and its mediating mechanism may vary in different age stages. Figure 2 shows the architecture of our theoretical framework.

Theoretical Framework
On the basis of some research results, this study proposed a theoretical framework. We believe that education has a significant effect on depression, and this influence is mainly transmitted through three types of factors represented by economic level, lifestyle, and cognitive level. This relationship and its mediating mechanism may vary in different age stages. Figure 2 shows the architecture of our theoretical framework. Therefore, this study assessed the association between education and life-course depression in middle-aged and elderly in China. We propose four hypotheses: (1) education can indirectly affect depression in middle-aged and elderly people through economic level, (2) education can indirectly affect depression in middle-aged and elderly people through health-related lifestyle, (3) education can indirectly affect depression in middleaged and elderly people through cognitive level, and (4) age stage in the life course moderates the effect of education on depression.

Outcome Variable
Depression was measured by the Centre for Epidemiological Studies Depression Scale-10 (CES-D10) in the CHARLS questionnaire [26]. The CES-D10 comprises 10 questions about depression, and the answers included four options: (1) rarely, (2) some days (1-2 days per week), (3) occasionally (3-4 days per week), and (4) most of the time (5-7 days per week). Among the 10 questions, 8 questions were negative statements, and 2 were positive statements. The answers were recorded as 0 (rarely) to 3 (most of the time) for the negative questions and 3 (rarely) to 0 (most of the time) for the positive questions. The depression index was obtained from the sum of the scores of the 10 questions. We calculated the total score of 10 items as a respondent's final score, with a maximum of 30 points. A higher score indicated lower depression.

Mediators
This study selected 8 variables of the respondents in the 2018 tracking survey as mediators of depression, including the following: (1) economic level, such as personal annual gross income (a continuous variable, taking a logarithm); (2) health-related lifestyle, including smoking (yes vs. no), alcohol consumption (yes vs. no), social activities (yes vs. no), physical exercise (yes vs. no), and taking a nap after lunch (yes vs. no); and (3) cognition level, including episodic memory (a continuous variable) and mental status (a continuous variable). Therefore, this study assessed the association between education and life-course depression in middle-aged and elderly in China. We propose four hypotheses: (1) education can indirectly affect depression in middle-aged and elderly people through economic level, (2) education can indirectly affect depression in middle-aged and elderly people through health-related lifestyle, (3) education can indirectly affect depression in middle-aged and elderly people through cognitive level, and (4) age stage in the life course moderates the effect of education on depression.

Study Variables 2.2.1. Outcome Variable
Depression was measured by the Centre for Epidemiological Studies Depression Scale-10 (CES-D10) in the CHARLS questionnaire [26]. The CES-D10 comprises 10 questions about depression, and the answers included four options: (1) rarely, (2) some days (1-2 days per week), (3) occasionally (3-4 days per week), and (4) most of the time (5-7 days per week). Among the 10 questions, 8 questions were negative statements, and 2 were positive statements. The answers were recorded as 0 (rarely) to 3 (most of the time) for the negative questions and 3 (rarely) to 0 (most of the time) for the positive questions. The depression index was obtained from the sum of the scores of the 10 questions. We calculated the total score of 10 items as a respondent's final score, with a maximum of 30 points. A higher score indicated lower depression.

Mediators
This study selected 8 variables of the respondents in the 2018 tracking survey as mediators of depression, including the following: (1) economic level, such as personal annual gross income (a continuous variable, taking a logarithm); (2) health-related lifestyle, including smoking (yes vs. no), alcohol consumption (yes vs. no), social activities (yes vs. no), physical exercise (yes vs. no), and taking a nap after lunch (yes vs. no); and (3) cognition level, including episodic memory (a continuous variable) and mental status (a continuous variable).
Many studies have divided cognitive ability into two aspects: variable and fixed abilities, which can be represented by episodic memory ability and mental status, respectively [33,34]. The interviewer would read 10 words to the respondents and ask the respondents to recall the words they heard at two different times. If they successfully recalled a word, then they would get 1 point; otherwise, they would get 0 points. The interviewer asked the respondents twice, and the average of the two recall scores was the episodic memory score. Therefore, the episodic memory score ranged from 0 to 10 points. Mental status was measured by the number of five math calculation questions answered correctly by the respondents and whether they knew the year, month, day, week, and season of the interview. Each correct answer was scored 1 point, and a wrong answer was scored 0 points. The total mental state score ranged from 0 to 5. Therefore, cognitive ability was measured using the sum of episodic memory and mental state scores, which ranged from 0 to 15.

Control Variables
The control variables in this study mainly consisted of demographic characteristics, such as gender (male vs. female), age groups (a categorical variable), place of residence (city/town vs. rural), marital status (married with spouse presently vs. married but not living with spouse temporarily for reasons such as work/separated/divorced/widowed/never married), ethnicity (Han vs. ethnic minorities), and religious belief (yes vs. no).

Key Variables
The key variables included education, which was measured by the highest level of education, and age, which was divided into middle and old age according to the age classification criteria issued by the United Nations Health Organisation. In this study, the samples aged 45-59 were divided into the middle-aged group, and the samples aged 60 and above were divided into the middle-aged and elderly groups.
The participants were asked, "What is the highest level of education you have completed?" The original answers were classified into 11 categories: illiterate, did not finish primary school but capable of reading and/or writing, home school, elementary school, middle school, high school, vocational school, three-year college, four-year college, master's programs, and Ph.D. programs. A higher number indicated a higher level of education.
The descriptive statistics of each variable are shown in Table 2. We used the k-nearest neighbour (k-NN) imputation algorithm to fill in the missing data in our study (Table 1), where each missing value on some records was replaced by a value obtained from related cases in the entire set of records. The most notable features of the k-NN imputation algorithm are as follows: (a) the imputed value is the value that has actually appeared, and no secondary processing is performed; (b) the distribution structure of the original data is retained in accordance with the variable information; and (c) k-NN imputation is completely nonparametric and does not depend on the relationship between y and x. We assumed that the k-NN method determines the closest k (k = 5) elderly with missing data in accordance with the Euclidean or L2 distance.

Test of Mediating Effect
According to the theoretical framework, this study established a multiple linear regression equation of the influence of education on depression to detect the mediating effect, as shown as follows: where H i represents the depression of individual i, E i is the education of individual i, X i represents all control variables of individual i, and ε i represents the random disturbance term.
In Equation (2), this study gradually increased the mediating variable M. M i represents the value of individual i on the three mediators, and µ i represents the random disturbance term. The three mediators in this study are economic level, health-related lifestyle, and cognitive level.
In Equation (3), to reflect the influence of education on depression in the life course, we further included the interaction item EA between education and different age stages. EA i represents the interaction term results of different education levels and age stages of individual i, and ρ i represents the random disturbance term.
Given that this study involves multiple parallel mediators and the distribution of the health level of the dependent variable is biased, we further used the bootstrap method based on ordinary least square regression analysis to conduct an accurate mediation test for our hypothesis. The number of bootstrap repeated samplings set in this paper was 1000 times. Stata 14.0 software (Stata Corp LP, College Station, TX, USA) was used for statistical analysis in a Windows environment. Table 3 shows the effect of education on depression based on all samples. In Model 1, education was significantly positively associated with depression (α 1 = 0.520, p-value < 0.001). Model 2 added the economic level variable based on Model 1. The degree of the significant positive association between education and depression decreased (β 11 = 0.455, p-value < 0.001). This situation also appears in Models 3 and 4, which respectively added health-related lifestyle (β 12 = 0.402, p-value < 0.001) and cognitive level (β 13 = 0.505, pvalue < 0.001). The explanation level of the three mediators for depression could reach 78.5%, and they were all significantly positively associated with depression. The cognitive level had a greater influence on depression than economic level and health-related lifestyle (0.658 vs. 0.125/0.058).

Influence of Education on the Depression of All Samples Using Linear Regression
Model 6 further added the interaction term of education and age group based on Model 5. Education was significantly positively associated with the depression of middleaged and elderly people (β 15 = 0.152, p-value < 0.05), but no significant difference was observed between the two age groups (δ 1 = −0.024, p-value = 0.449). Table 4 shows the results of the correlation test of the core variables in this study. It can be seen that, except for the significant negative correlation between health-related lifestyle and education, and the interaction between age and education, all other variables are positively correlated. Table 3. Results of multiple regression analysis and mediation effect analysis of all samples.   Note: *** represents p-value < 0.001, ** represents p-value < 0.05.

Influence of Education on the Depression of the Middle-Aged and Elderly Using Linear Regression
As shown in Table 5, this study analysed middle-aged and elderly samples. The results showed that the effect of education on depression had a significantly positive influence in both groups, indicating that with the change of age groups, the effect of education on depression was not significant. Education had a significant positive effect on depression through three mediators in all age groups. Consistent with the full sample results, the cognitive level was more important than the other two mediators. Note: *** represents p-value < 0.01.

Results of Multiple Mediation Tests: Total, Direct and Indirect Effect
This study used the bootstrap method to further analyse the multiple mediating outcomes of education on depression. From Table 6 and Figure 3a, the total, direct and indirect effects of the whole sample were significant, and the cognitive level path accounted for 84.9% of the indirect effect. From Table 6 and Figure 3b, the direct effect of the middleaged sample was not significant, and the total and indirect effects of the three mediating pathways were all significant; that is, economic level, health-related lifestyle, and cognitive level should produce complete mediation. The cognitive level path accounted for 74.3% of the indirect effect. As shown in Table 6 and Figure 3c, similar to the whole sample, the total, direct, and indirect effects of the elderly were all significant, indicating that in the elderly sample, the three mediating pathways only produced a partial mediating effect. The cognitive level path accounted for 83.9% of the total indirect effect.

Discussion
This study was based on cross-sectional data from 15,767 middle-aged and elderly individuals in the 2018 follow-up survey of the CHARLS database. The data included the

Discussion
This study was based on cross-sectional data from 15,767 middle-aged and elderly individuals in the 2018 follow-up survey of the CHARLS database. The data included the sociodemographic information, economic level, cognitive level, health-related lifestyle, and depression of each middle-aged and elderly sample. We analysed the effect of education on depression using multiple linear regression models and bootstrap multiple mediation models. The results showed that the two methods showed good performance in analysing the relationship between education and depression and the mediating effect. There existed a mediating effect in the influence of education on depression, and significant differences were observed in the mediating effect in the life course.
This study found that three mediating variables, namely, economic level, healthrelated lifestyle, and cognitive level, had significant positive effects on depression, which is consistent with the findings of multiple studies [35,36]. Previous studies on the relationship between education and health have not analysed depression separately and rarely considered the mediating effect of cognitive level [37][38][39]. The concept of life course in previous studies has mainly focused on the comparison between young and older samples [40,41]. This study further refined the research samples, mainly comparing middle-aged and elderly groups, and enriched the life course perspective of related research. This study found that economic level, health-related lifestyle, and cognitive level were all important mediating variables affecting the depression of middle-aged and elderly people. The explanation rate could reach about 80%, and cognitive level was the most important. The effects of the three mediating variables were different between the middleaged and elderly groups. The influence of the economic level in the middle-aged group was significantly lower than that of the health-related lifestyle, but in the elderly group, the influence of the two mediating variables was basically the same. Thus, the economic level is more likely to appear in the treatment after the disease occurs, whereas the health-related lifestyle focuses on the prevention of the disease. In addition, the cognitive level was the most important in the middle-aged and elderly groups, which indicates that if there exists a problem with the cognitive level in the life course, it will have a devastating effect on mental health and quality of life [42]. Each person has unique core values and priorities. The degree of depression is determined by how well people achieve core values in their lives [43,44].
The results of the mediation effect model analysis showed that the direct effect of education on the depression of middle-aged people was insignificant, but it was significant for the elderly sample; the former was a complete mediator, whereas the latter was a partial mediation [45]. To a certain extent, this finding reflects that the ways in which education affects depression will gradually diversify with the development of the life course. In addition to health-related lifestyle, economic level, and cognitive level, education also affected the depression of the elderly sample through other factors, which may include dietary nutrition, sleep quality, social support, and medical and pension insurance [46]. In addition, no significant difference was observed in the influence of education on the depression of middle-aged and elderly people under the life course. However, some studies have shown that the effect of education on depression differs significantly between young and older people, which suggests that the cumulative advantage of education on depression is mainly reflected at about 45 years of age, and the advantage then gradually weakens; the reason is the main knowledge reserve is continuously strengthened in the youth, which has the greatest influence on depression [47]. Thereafter, the knowledge reserve in the middle-aged and elderly is relatively stable, so the influence on depression will not change significantly.
This work is the first comprehensive study of the relationship between depression and education in middle-aged and elderly people across the life course using national-level data. The results of this study based on the mediation model can help policymakers and the general public provide a scientific basis for early intervention in education.

Limitations
Our study has some limitations. Firstly, only three mediators and six control variables were considered. We limited our analysis to potential mediator variables already available in the dataset, including economic level, health-related lifestyle, and cognitive level. Therefore, the generalisability of our conclusions still needs to be further strengthened, such as cultural factors. In future studies, we could continue to add more specific mediators to help improve model performance, such as educational equality, dietary nutrition, and sleep quality. Secondly, the cross-sectional data mainly used in this study may lead to biased conclusions, and the panel data could be used to further verify the conclusions in the next step. Finally, the measurement of education indicators in this study was mainly based on school education; however, the learning and accumulation of life experience and health experience are also highly important. Due to data limitations, enriching the connotation of education indicators is impossible. In the next step, we could collect more variables to comprehensively evaluate the education.

Conclusions
On the basis of the education, economic level, health-related lifestyle, cognitive level, and depression of middle-aged and elderly people, we established and compared the total, direct, and mediating effects of education on depression under the life course. Mediating variables (economic level, health-related lifestyle, cognitive level) have significant effects on depression, and the strength and criticality of education and the three mediator variables in the life course are also different. The number of mediating variables should be further increased, and the measurement methods of depression must be developed to improve the credibility of research results.

Institutional Review Board Statement:
The study was conducted in accordance with the Declaration of Helsinki and approved by the Institutional Review Board (IRB) of Peking University. The IRB approval number for the main household survey, including anthropometrics, is IRB00001052-11015, and the IRB approval number for biomarker collection is IRB00001052-11014.
Informed Consent Statement: Informed consent was obtained from all subjects involved in this study.

Data Availability Statement:
The original data of the CHARLS database is open to the public and can be obtained through an application. The official website of CHARLS is http://charls.pku.edu.cn/, accessed on 5 December 2022. The datasets used and/or analysed during the current study are available from the corresponding author upon reasonable request.