{'fraction_non_alphanumeric': 0.02453385672227674, 'fraction_numerical': 0.008969121573818382, 'mean_word_length': 5.194232400339271, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 2, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Impact of Social Participation Types on Depression in the Elderly in China: An Analysis Based on Counterfactual Causal Inference

Objectives Depression is the leading cause of ill health and disability worldwide, and has become one of the key issues in the public health sector. Social participation is one of the most important measures to support the rapidly aging population and can reduce the risk of depression in the elderly. This study aims to explore the causal relationship between different types of social participation and depression in the elderly, and reduce the level of depression in the elderly by promoting social participation. Methods In order to accurately evaluate the causal relationship between participation in different types of social activities and depression in the elderly, this paper uses propensity score matching (PSM) for analysis based on counterfactual framework. The specific matching methods used are: k-nearest neighbor matching method, kernel matching method and radius matching method. Results In this study, 31.4% of the elderly have depression, and the proportion of female elderly is significantly higher. Participation in different social activities has different effects on depression in the elderly. Taking into account sample selection bias, participation in friend-making, exercise, and recreational activities can effectively reduce the risk of depression in the elderly. Compared with other social activities, participation in exercise and recreational activities are more helpful to reduce the risk of depression in the elderly. Participating in exercise activities only reduces the risk of depression in 60–69-year-olds, while participating in economic activities increases the risk of depression in the elderly aged 70 and over. Compared with the male elderly, participation in friend-making, exercise, and recreational activities results in the female elderly having stronger resistance to the risk of depression. Conclusions Depression was prevalent among the elderly. Through PSM analysis, different types of social participation have different effects on depression in the elderly. In order to maximize the positive effects of different types of social participation on depression in the elderly, it is necessary to provide differentiated social support environment for the elderly. Expanding the research on the relationship between social participation and depression of the elderly will help to formulate more reasonable public health policies and improve the mental health of the elderly.


INTRODUCTION
In the 21st century, the world is facing an increasingly severe situation of population aging. In 2000, China joined the list of countries with an aging population. According to the data of China's sixth census in 2010, the number of people aged 60 and over was 177.65 million, accounting for 13.26% of the total population (1). By China's seventh census in 2020, the population aged 60 and over was 264.2 million, accounting for 18.70% of the total population (2). China has accelerated its aging process over the past two decades. Compared with other countries that have become old-age countries, China's population aging has two prominent characteristics: first, the fast speed of population aging and the absolute growth of the elderly population; second, the process of population aging is ahead of the level of economic development.
Within the context of population aging, the main diseases of the elderly, such as chronic diseases, disabilities, and mental disorders, have attracted widespread public attention. Depression is a common mental disorder. According to the latest statistics published by the World Health Organization (WHO) in 2019, there are more than 350 million people with depression worldwide (3). Prolonged depression has a significantly adverse impact on patients' work, life, and interpersonal communication.
The report "Depression and other common mental disorders" published by the WHO in 2017 shows that depression is the single largest contributor to disability in the world and the main cause of death by suicide, and the elderly have a higher risk of morbidity than the general population (4). According to a national survey, 32.55% of the elderly in China suffer from depression (5). In 2016, the disease burden caused by depression among 60-69year-old elderly people in China was 1.7 times higher than that in 2000, and there was an accelerated upward trend (3). After entering old age, the elderly face a decline in their physical function, transformation of family roles (such as changed family status, an empty nest, widowhood, etc.), and social roles (changed social status, retirement, changes in leisure activities, etc.). If the elderly cannot adapt to these changes, anxiety and depression are inevitable consequences, and even suicide. Studies have confirmed that the high incidence of suicide among the elderly is related to physical and psychological stress such as depression and helplessness (6). Senile depression has become a social public health problem. Strengthening the research on senile depression has important practical significance for actively addressing the aging of the population.
According to social capital theory, elderly people improve their social capital through social participation, while social capital improves individual health through emotional and material support among social members (7,8). Socioemotional selectivity theory holds that everyone has different self-needs and resource capital, and social participation is the behavior of meeting self-needs through resource exchange (9). According to activity theory, older people should replace their roles lost due to widowhood or retirement with new ones, so as to adapt to society and obtain psychological satisfaction (10). Elderly people can establish new roles through social participation to alleviate the symptoms of depression caused by role changes. Population migration and the miniaturization of the family structure in China have caused marked changes in intergenerational relationships, increasing the number of elderly people living alone and the proportion of empty nesters. Therefore, the elderly should be encouraged to alleviate their depression through social participation. As an important measure to actively deal with population aging, social participation has attracted widespread public attention. Many studies have shown that active social participation can effectively reduce the risk of depression, improve life satisfaction, and protect the mental health of the elderly (11)(12)(13)(14)(15). Participating in social activities can slow down the cognitive decline of the elderly and help protect their mental health (7); the higher the social participation of the elderly, the lower the level of depression (16). However, the complexity of social participation means that different activities have different effects on depression in the elderly, as highlighted by previous studies; participation in religious organizations has the most obvious effect on their health (12). Different types of social participation may affect the welfare, health, and survival risk of the elderly through different mechanisms (17).
There is abundant current research on the influence of social participation on the depression of the elderly, but there are still areas of debate and limitations. First, a debated point is the correlation between different types of social activities and depression in the elderly. Studies have found that participation in mentally stimulating and exercise activities has a certain causal effect on senile depression (18), while participation in helping activities has no significant effect on senile depression (12). However, some studies have pointed out that by participating in voluntary service, the elderly can realize their own value and improve their quality of life (19). The withdrawal of the elderly from work can reduce their sense of control over their lives and lead to a higher incidence of depression (20). However, some studies have pointed out that the physical health and life satisfaction of the elderly increase after retirement, especially the performance of mental workers (21). It is evident that the relationship between different activity types and depression in the elderly is subject to debate. Therefore, it is necessary to classify social activities to study their causal relationship with depression in the elderly, so as to encourage the elderly to choose social activities that are beneficial to their mental health. Second, the existing research does not satisfactorily address the problem of sample selection bias. Whether or not the elderly participate in social activities, and their choice of activities, are not randomly assigned but determined by individual, family, and social characteristics. Thus, it is impossible to accurately judge whether the difference in the level of depression of the elderly is caused by participation in social activities or by differences in individual, family, and social characteristics. The existence of sample selection bias may lead to an underestimation of the impact of social participation on depression in the elderly.
In countries outside China, social participation is mainly defined based on social relations, the exchange of resources, and broader social activities, emphasizing contact and interaction with others in the process of social participation to obtain individual value (22)(23)(24). Chinese scholars have conducted a more detailed and localized examination of social participation, and contend that no matter how the elderly maintain contact with society, this is a form of social participation (10). Therefore, this study, based in China, divides the daily activities that Chinese elderly people mainly participate in into five types: friendmaking, exercise, recreational, helping, and economic activities, so as to comprehensively compare the heterogeneous effects of various types of social participation on the depression of the elderly. Furthermore, counterfactual inference is a useful tool for comparing outcomes of interventions on complex systems and is widely used in the study of causality (25,26). In order to more accurately evaluate the causal effects of social participation types and depression in the elderly, this study uses propensity score matching (PSM) based on the counterfactual framework of Rosenbaum and Rubin (27). This will enable more accurate identification of the types of social activities that can alleviate the depression of the elderly, and provides a theoretical basis for improving the mental health and quality of life of the elderly through social participation.

Data
This study uses the data from the China Health and Retirement Longitudinal Study (CHARLS), which was conducted in 2015. This is a large-scale interdisciplinary survey project based at the National School of Development at Peking University, and jointly implemented by the Institute of Social Science Survey and Youth League Committee of Peking University. CHARLS aims to obtain high-quality micro-data representing Chinese middleaged and elderly people aged 45 and over, and their families, to analyze the aging problem of the Chinese population and thereby promote interdisciplinary research on this area. The CHARLS national baseline survey was carried out in 2011 and is tracked every 2 years. Its sample covers 150 counties and 450 communities (villages) in 28 provinces (autonomous regions and municipalities) across China. In the national follow-up in 2015, a total of 23,000 respondents from 12,400 households were interviewed. The survey data is publicly available and can be found on GITHUB. The publicly available datasets presented in this study are available from an online repository: https://github. com/Guo-jiamin/CHARLS. This study analyzes the impact of social participation on the mental health of the elderly based on the 2015 data. According to the study research purpose and needs, we first merged the data set according to the individual IDs, and then cleaned up the data, reassigned variables, removed missing values, and finally obtained a sample of 7,901 senior citizens aged 60 and over.

Variables
The outcome variable was set as depression of the elderly; and the level of depression was partially reflected by the CES-D Depression Scale, which was constructed based on the depression-related questions in the 2015 questionnaire. The questionnaire asked the respondents about their feelings and behaviors over the past week, including 10 questions where respondents were presented with a series of negative or positive statements. Negative statements included "I am troubled by some trivial things, " "It is difficult to concentrate when doing things, " and "My sleep is not good." Positive statements included "I am hopeful for the future" and "I am happy." For each question, respondents were asked to select from four options to indicate the frequency with which each statement had applied to them in the past week: "Little or not at all (<1 day), " "Not too much (1-2 days), " "Sometimes or half the time (3-4 days), " "Most of the time (5-7 days)." Values of 0-3 were assigned to these options with reverse scoring for positive questions, and the scores of the 10 questions were added up to obtain each respondent's depression level. The total score was between 0 and 30: a higher total score signifies a higher depression level, while a lower total score signifies a lower depression level. A reliability test was conducted on the scale options, which showed that the Cronbach's Alpha was 0.795, and the reliability coefficient was high, meaning that the scale could be used to measure the depression level of the respondents.
In order to know the depression status of the elderly in the sample, we think that when the CES-D value is >10, the elderly have depression, while if the CES-D value is ≤10, the elderly do not have depression (28). As shown in Table 1, the proportion of depression in the elderly is 31.4%, which is similar at different ages. The proportion of depression in female and male is 42.43 and 23.74%, respectively, and female is more prone to depression.
Although much research has been conducted on the concept of social participation, there is still no uniform definition in academic circles. In this paper, social participation is mainly understood in terms of how the elderly maintain contact with their surrounding environment and maintain interaction with society by participating in social activities. Social participation is thus viewed from a broad perspective; however, it is difficult to include all social activities within the scope of the research. Therefore, the research objects are restricted to the activities that the elderly generally participate in daily. The CHARLS questionnaire asked respondents the following multiple-choice question: "Did you engage in the following social activities in the past month?" and whether they participated in workrelated activities. As a result, in this study social participation activities are divided into the following five types: (1) Friendmaking activities: interacted with friends; (2) Exercise activities: went to a sport, social, or other kind of club; (3) Recreational activity: played Ma-jong, played chess, played cards, or went to a community club; (4) Helping activities: provided help to family, friends, or neighbors who do not live with you; did voluntary or charity work; cared for a sick or disabled adult who does not live with you; (5) Economic activities: engaged in any work. In this study, these five types of social participation were set as the five treatment variables that affect depression in the elderly, and assigned, respectively. A value of 1 was assigned to a variable if the elderly respondents participated in any activity of a certain type; otherwise, a value of 0 was assigned.
Other covariates that may affect depression in the elderly were divided into four categories: demographic characteristics, health status, family support, and social characteristics. The demographic characteristics variables include age, gender, and education level. Health status variables include activities of daily living (ADL), instrumental activities of daily living (IADL),

Counterfactual Framework
In order to accurately determine the causal relationship between participating in different types of social activities and the depression of the elderly, this study applied the PSM method to construct a counterfactual framework for the effects of participating in five social activities on the depression of the elderly (27). Counterfactual refers to a potential outcome or state of affairs that occurs when cause does not exist. Therefore, for the members in the treatment condition, the counterfactual is the potential outcome in the condition of control; for the members in the condition of control, counterfactual is the potential outcome in the treatment condition. The counterfactual framework emphasizes that individuals entering the treatment group and the control group have potential outcomes in both states. The counterfactual framework can be expressed as the following model: In Equation (1), it is assumed that the individual i in the treatment group will have two outcomes (Y 1i , Y 0i ), corresponding to the actual outcome and the counterfactual potential outcome, respectively. D i = 1 means to accept the treatment, D i = 0 means not to accepted the treatment, and Y i means the measured outcome variable. Based on such a counterfactual framework, the causal analysis becomes the difference between Y 1i and Y 0i . For friend-making activities in this article, the elderly who participated in such activities were used as the treatment group, and the non-participating elderly were used as the control group.
To study the causal relationship between participating in the friend-making activities and the depression of the elderly, it was necessary to determine the depression level of the respondent sample in the two states of participating in and not participating in the activity. Since each individual can only be in one state in reality, it was necessary to construct a counterfactual state to study the net effect of participating in this activity on the depression of the elderly. This counterfactual framework was also used to analyze exercise, recreational, helping, and economic activities. As shown in Table 3, Y T and Y Z represent the actual depression level and counterfactual potential depression level, respectively. If individual i participates in such activities, the depression level after participation can be obtained (Y T 1i ), but the potential depression level of non-participation cannot be known (Y Z 0i ). Similarly, if individual i does not participate in such activities, then the non-participated depression level can be obtained (Y T 0i ), but the potential depression level of participation cannot be known (Y Z 1i ). Therefore, it is necessary to construct the potential depression level Y Z 0i and Y Z 1i , that is, the counterfactual potential depression level. Equation (2) represents average treatment effect for the treated (ATT), and Equation (2) represents average treatment effect for the untreated (ATU). The main purpose of this study is to examine the changes in the level of depression in the treatment group after they participated in five social activities, so only the ATT value is observed.

Propensity Score Matching
The above analysis shows that it is necessary to construct counterfactual potential outcome variables. It is not possible to know the counterfactual state of the same individual, but it is possible to construct a matching individual with the same or similar characteristics. These characteristics can be represented by the probability of entering the treatment state (propensity score P), that is, the characteristics of multiple dimensions are compressed into one dimension. According to the similar propensity score P, the treatment group and the control group are matched, and then ATT is obtained by comparing the differences in the outcome variables of the two groups. The propensity score P is affected by individual, family, social, and other factors. These factors also affect both the treatment variable and the outcome variable, which leads to sample selection bias. We defined these factors that lead to sample selection bias as covariates or confounding variables. Taking into account sample Control group: selection bias, Equation (2) can be rewritten as equation (4): is the probability of an individual entering the intervention state based on controlling the covariate X i , and X i is the covariate that may affect the participation and depression of the elderly, including age, gender, education level, health status, and other variables. Based on the above ideas, PSM was proposed by Rosenbaum and Rubin (27), and it is a method to evaluate causal effects using non-experimental data. This method has the advantage of reducing the multiple dimensions of covariates and compressing them into a one-dimensional score, and then using the onedimensional score for matching, which can better solve the problem of sample selection bias. Therefore, based on the counterfactual framework, this study adopts PSM to analyze the causal relationship between the types social participation and depression in the elderly. K-nearest neighbor matching (29,30), kernel matching (29,31) and radius matching (29) are more commonly matching method used in PSM, and these three methods are also used in this study. The analysis steps of PSM in this study are shown in Figure 1.

Logistic Estimation Results of Different Social Activities
According to the research steps of the PSM method, the first step involves estimating the respective probability of the elderly respondents participating in five social activities. These five social activities were set as the dependent variables, while age, gender, education level, self-rated health, marriage, and other characteristics were set as the independent variables. Logistic regression was then used to obtain the propensity scores of the elderly respondents participating in the five social activities. Table 4 shows that the elderly respondents' participation in friend-making, exercise, recreational, helping, and economic activities is not random, but is affected by demographic characteristics, health status, family support, and social characteristics. With increasing age, the probability of the elderly participating in exercise, helping, and economic activities decreases. Female elderly have a higher probability of participating in friend-making and exercise activities, while male elderly have a higher probability of participating in recreational and economic activities. Respondents with a higher level of education have an increased probability of participating in friend-making, exercise, recreational, and helping activities, but a decreased probability of participating in economic activities. The elderly with good health have a higher probability of participating in exercise, recreational, and economic activities. The elderly without a spouse have a higher probability of participating in friend-making and exercise activities, while the elderly with a spouse and more children have a higher probability of participating in economic activities. The effects of medical insurance and pension insurance on the participation of the elderly in different social activities are also different.
In general, the decision to participate in social activities is intervened in by covariates such as age, gender, and education level. This kind of intervention allocation leads to sample selection bias, and the use of OLS regression cannot solve this problem well. Therefore, in order to more accurately evaluate the causal relationship between the five social activities and depression in the elderly, it was essential to analyze the data using PSM.

Propensity Score Matching Estimation Results
After obtaining propensity scores, these scores were used to match treatment group and control group members. The core idea of matching is to create a new sample after obtaining the propensity scores, so that the cases in it could be assigned to the treatment group with roughly the same possibility. In order to ensure the robustness of the results, k-nearest neighbor matching, radius matching, and kernel matching were used to investigate ATT of participating in five types of social activities on depression in the elderly. The matching results are shown in Table 5.
The results show significant differences in the level of depression between the treatment group and the control group. Before matching, there was a significant correlation between friend-making, exercise, recreational, and helping activities, and the level of depression. Compared with the elderly who did not participate in these activities, those who participated in friendmaking, exercise, recreational, and helping activities could reduce their depression level in an effective manner. After matching using k-nearest neighbor matching, radius matching, and kernel matching, the ATT of friend-making activities, exercise activities, and recreational activities are still significant. The absolute value of ATT for participating in friend-making activities is between 0.3 and 0.6; the absolute value of ATT for participating in exercise activities is between 0.6 and 1.0; and the absolute value of ATT for participating in entertainment activities is between 0.7 and 0.9. The average treatment effects of the three activities are: −0.477, −0.797, and −0.760. It can also be said that the depression level of the elderly was reduced by 0.477, 0.797, and 0.760 units by participating in friend-making, exercise, and recreational activities, respectively. In general, participation in these activities can effectively reduce the risk of depression in the elderly, while participation in exercise and recreational activities are more helpful to reduce the risk of depression in the elderly.

Evaluation of Matching Quality
After PSM, it was necessary to evaluate the quality of matching. The evaluation involves two aspects: evaluating whether sample selection bias was reduced before and after matching; and evaluating the loss of the sample after the matching.
Sample selection bias can be evaluated by testing the balance of covariates. The balance test mainly examines whether the matched covariates are still significantly different between the treatment group and the control group. The balance of data can be judged by observing the significance (P > chi2), the degree of variation of the standard bias (MeanBias, MedBias) and the size of the balance coefficient B and R of the covariates before and after matching. The joint significance test of covariates is significant before matching and no longer significant after matching, which shows that the covariate difference between the treatment group and the control group is small and the matching result is good. The absolute value threshold of the standard bias of PSM is generally selected as 5 or 10%. If the standard deviation is less than the threshold, the match can be considered to pass the balance test. At the same time, if the balance coefficient B is <25 and the R value is between 0.25 and 2, the matching effect can be considered good. Table 6 shows the test results. After matching, the covariates were no longer significant; the standard bias of the covariates of the five social activities decreased significantly, and all were <5%; the coefficients B are <25 and the R values are about 1. The test results show that the covariates between the treatment group and the control group are effectively balanced, indicating that sample matching effect is good and the sample selection bias is well-handled. The loss of the matched sample can be evaluated by finding the common value range of the propensity scores. The premise of matching is to ensure that the value range of the propensity scores of the treatment group and the control group have a common support field. Otherwise, the control group individuals that can match the treatment group individuals will not be found. In order to improve the matching quality, only individuals whose propensity scores are in the common value range are usually retained, and the samples outside the common value range will be lost. If the propensity scores of the control group and the treatment group have a large enough range, then the sample loss after matching will be less, which meets the matching requirements. Conversely, if the common value range is too small, a large number of samples will be lost, leading to bias. Each subfigure in Figure 2 graphs the propensity score histogram by treatment status, which shows that the propensity scores for both the treatment and control groups are mostly within common values (on support), and the number of samples lost after PSM is very small (off support), so it is suitable for matching.

Bias-Corrected Matching Estimator
Due to the uncertainty in estimating propensity score in the first stage of PSM, imprecise matching generally has bias. Abadie and Imbens proposed a method of bias-corrected matching estimator and considering heteroscedasticity robust standard error (32). Based on the counterfactual framework, only two results exist in the research object: observed and unobserved results. The unobserved result is missing data, which is estimated according to the matching estimator of the sample data. That is, the missing value is filled with a "vector norm" similar to the propensity score, and the filled data can be directly estimated (33). In order to make the results more robust and reliable, this study explored   the average treatment effect of participating in five types of social activities on depression in the elderly based on bias-corrected matching estimator. The results are shown in Table 7.
The results show that after correcting the matching bias, friend-making, exercise, and recreational activities still have a significant impact on the depression of the elderly (P < 0.1), and the average treatment effect of participating in helping and economic activities on the depression of the elderly is still not significant. Friend-making, exercise, and recreational activities reduce the depression level of the elderly by 0.532 units, 0.617 units, and 0.746 units, respectively. The analysis of Table 5 shows that the depression level of the elderly was reduced by 0.477, 0.797, and 0.760 units by participating in friend-making, exercise, and recreational activities, respectively. The results of the two methods are similar, indicating that the estimation results of ATT in PSM are robust.

Matching Estimation Results by Age and Gender
As shown in Table 8, the matching results show that there are age and gender differences in the impact of five types of social activities on the depression of the elderly.
The matching results by age show that there is no age difference in the influence of participating in friend-making and recreational activities on depression in the elderly. Participation in friend-making activities can reduce the depression level of the elderly by about 0.5 units, and recreational activities can reduce the depression level of the elderly by 0.7 units. Participation in exercise activities only have a significant treatment effect on the depression level of the elderly aged 60-69, and can reduce the depression level of these elderly by 0.8 units.
The matching results by gender show that participation in friend-making, exercise, and recreational activities have significant treatment effects on the depression levels of male and female elderly, but there are large differences in the degree of treatment. Participation in friend-making activities can reduce the depression level of female elderly by about 0.

DISCUSSION
This study found that participation in friend-making, exercise, and recreational activities can significantly reduce the risk of depression in the elderly, which is consistent with previous  research findings (12)(13)(14), indicating that active social participation can reduce the level of depression in the elderly. As China is a society of acquaintances, interaction with friends is the main form of social participation of the elderly. The interaction of the elderly with friends gives them their most important emotional sustenance besides care for their children, and their friendship network has a greater protective effect on the mental health of the elderly than their family network (34). However, participation in friend-making activities is mainly to communicate with friends, and its activity form is relatively single, so its positive effect is limited. Exercise is a powerful treatment method for the psychology and physiology of the elderly. Elderly people who participate in regular exercise tend to think that they are stronger, healthier, and more energetic, and so are more likely to adhere to continued participation in exercise. Physical strength and mental health form a virtuous circle. By participating in exercise activities, the elderly can also obtain more opportunities to interact with others, find like-minded friends, and obtain emotional support. Recreational activities based on the interests and hobbies of the elderly can enable them to release negative emotions to the greatest extent possible and enjoy a pleasant mood. At the same time, activities such as playing chess and cards often have the nature of a game, which can stimulate the desire of the elderly to win, give them an outlet for their wisdom and skills, and enable them to obtain happiness and a sense of achievement. In addition, compared with the male elderly, participation in friend-making, exercise, and recreational activities results in the female elderly having stronger resistance to the risk of depression, and some studies have found that positive associations of the frequency and autonomy of social participation with mental health are stronger in female elderly than male (35). The above results suggest that social participation has a more positive effect on mental health in female elderly than male. The reason may be that females tend to be better at expressing their emotions, so they are more likely to form intimate relationships and feel happy in the process of social participation. Therefore, in order to reduce the risk of depression in the elderly, it is essential to meet their need to participate in friend-making, exercise, recreational, and other interactive activities by putting in place settings and equipment suitable for the elderly. Helping activities have no significant effect on the risk of depression in the elderly, which is in line with the previous study (12,18). Some studies have found that there is a negative association between formal volunteer activity and depression among urban elderly, while there is a positive association between caring for a sick or disabled adult and depression among both urban and rural elderly (36). However, this is not a contradiction. In this study, participation in volunteer activities, free help, and providing care for others are all helping activities; free help and care for others account for more than 90% of helping activities, so it cannot be denied that participation in formal volunteer activities can reduce the risk of depression in the elderly. Chinese traditional ethics still attaches importance to the maintenance of the productivity of the elderly, and social morality encourages them to enhance their sense of value by taking care of their relatives (37). Therefore, in China, a country with close family relations, most elderly people engage in activities to take care of their relatives. Helping and caring for others requires the time, energy, and emotions of the elderly, but they can also obtain a sense of achievement and satisfaction through realizing their self-worth. Participation in economic activities has no effect on depression in the young elderly, but can increase the risk of depression in the elderly aged 70 and over, which is different from previous studies (20,21). It shows that there are age differences in the impact of work on depression in the elderly. In this paper, 55% of the elderly respondents engage in a certain form of work in their old age. With an aging population, the working elderly will become an important part of the labor market, and the Chinese government is also intending to change policy to delay the retirement age. Since participation in economic activities in this study has no effect on depression in the young elderly, it also has a certain reference value for appropriately increasing the retirement age. At the same time, the elderly aged 70 and over may experience economic pressure and need to continue to work in their later years to maintain their livelihood, which is not conducive to their mental health. It is necessary to reduce the participation rate of economic activities of the elderly aged 70 and over by improving the level of social security. Helping others and working belong to the activities of creating social value, which is conducive to promoting social and economic development. Therefore, the elderly can be encouraged to realize their self-worth by creating social value, so as to improve their mental health.
In general, different types of social participation have different effects on depression in the elderly. This finding has strong guiding significance for active aging. The concept of "Active Aging" was officially put forward by the WHO at the Second World Assembly on Aging in 2002. It is an upgrade of the concept of healthy aging, emphasizing the health, social participation, and security of the elderly. At present, the health status and social security level of the elderly in China are still at a low level compared with developed countries, and cannot meet the participation needs of the elderly. For friend-making, exercise, and recreational activities, it is necessary to create a good participation environment for the elderly, provide diversified forms of participation, and encourage them to choose activities that are more conducive to their own health. For helping activities, the participation of Chinese elderly has no obvious positive effect on depression. The question arises as to whether this is related to the lack of health security and social support. The participation rate of the younger elderly in economic activities is relatively high, but their mental status cannot be guaranteed. A further question arises as to whether this is related to economic pressure, labor market restrictions, or discrimination. In order to enable the elderly to transform social value into selfworth through participation in helping and economic activities, improving the health and social security of the elderly is an important issue to be considered in China in the future.
This study had various strengths and limitations. The strength of the study is to explore the causal relationship between different types of social participation and depression in the elderly on the premise of eliminating sample selectivity bias. Compared with previous studies, the research results are more accurate, so as to provide a theoretical reference for improving the mental health of the elderly through social participation. Although we have achieved some research results through PSM, this paper still has some limitations. First, because there is no unified classification standard for social activities, this paper is more subjective in the classification of social participation, and the classification of social participation is not comprehensive enough due to data limitations. Second, different types of social participation have different effects on depression in the elderly, and there must be different influence mechanisms. This paper lacks in-depth analysis of the influence mechanism, which need to be further explored. Third, machine learning is widely used in the field of prediction and analysis (38-40), and this cutting-edge method has higher prediction accuracy. In this study, although logistic regression is applicable to PSM, it is more traditional. We will try to integrate cutting-edge methods such as machine learning into this research in the future.

CONCLUSIONS
Most of the existing studies take social participation as a single index or only study a certain type of social participation to explore the causal relationship between social participation and depression in the elderly, and without controlling the sample selectivity bias, this causal relationship is controversial. Therefore, this paper classifies social participation, and based on the counterfactual framework, applied PSM to conduct an indepth analysis of the causal relationship between participation in different types of social activities and depression in the elderly. First, in this study, the elderly have a higher probability of depression, and it is more common in female elderly. Future health system development in China should take targeted prevention and intervention measures for high-risk groups. Second, participation in friend-making, exercise and recreational activities can reduce the risk of depression in the elderly, and has a stronger resistance to depression in female elderly than male. It shows that it is effective to intervene the depression of the elderly, especially female, through social participation. In order to maximize the positive role of social participation, it is very necessary to further optimize public service facilities and create a good participation environment for the elderly. Third, participation in economic activities is only related to depression of the elderly aged 70 and over. On the one hand, this result can provide reference significance for appropriately extending the retirement age to meet the needs of the market labor force. On the other hand, it is necessary to reduce the economic participation rate of the elderly aged 70 and over by improving the level of social security.
In short, with the acceleration of the aging process, depression of the elderly has become an important topic in the field of public health, and social participation is an effective way to resist depression. This study aims to research the differences in the relationship between different types of social participation and depression in the elderly, which is of great significance to formulate a differentiated social support environment. In order to maximize the positive impact of different types of social participation on depression of the elderly, it is very necessary to optimize public service facilities, eliminate market employment restrictions and age discrimination, and improve the level of health and social security.

DATA AVAILABILITY STATEMENT
The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found in the article/Supplementary Material.

ETHICS STATEMENT
Ethical review and approval was not required for the study on human participants in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required for this study in accordance with the national legislation and the institutional requirements.

AUTHOR CONTRIBUTIONS
XW and JG conceived the idea. JG drafted the manuscript. HLiu, HLi, and TZ participated in the discussion and put forward valuable opinions. HLiu, HLi, and TW revised and polished this article. All authors have contributed to the article and agree to submit this version.