Abstract
This study assesses the influence of social support, self-esteem, depression, and education on psychological resilience among men who have sex with men (MSM) to inform policy-making. Data were collected from 1,070 MSM via an online survey in Zhejiang and the other 17 provinces, China, covering demographics, HIV-status and psychological factors. Psychological resilience and its influencing factors were analyzed using the Chi-square Automatic Interaction Detector (CHAID) decision tree and multivariable ordinal logistic regression. Among respondents, depression prevalence was 28.9%, HIV prevalence was 3.4%, low social support was 12.9%, and low self-esteem was 34.5%. Analysis identified depression, social support, self-esteem, and education as key factors influencing psychological resilience. Depression, low social support, low self-esteem, and education were significantly associated with psychological resilience in the study sample population of MSM. Targeted interventions addressing these factors are essential to improve mental health and reduce HIV risk.
Similar content being viewed by others
Introduction
Men who have sex with men (MSM) defines as men who engage in sexual activities with other males, regardless of their sexual orientation—whether gay, bisexual, or heterosexual1. MSM face a significantly higher risk of HIV infection than the general population. Global data show the proportion of new HIV cases among MSM increased from 11% in 2010 to 20% in 20222. and UNAIDS data indicate MSM are 23 times more likely to be infected with HIV1,3. Beyond physical health risks, MSM often experience a higher prevalence of mental health issues, particularly depression4,5. A 2021 survey in western China found a depression prevalence of 38.0% in this group6. The mental health of MSM is influenced by a complex social and psychological environment, including factors such as social support, self-esteem, and depression, which collectively shape their psychological resilience and affect their ability to cope with stress and health challenges7. Additionally, MSM encounter due to their sexual behavior, which can impact their mental well-being and create barriers to accessing essential HIV testing and treatment services8.
Psychological resilience defines as an individual’s ability to adapt effectively to adversity, trauma, threat, or other significant life stressors9. It is one of the most important indicators of mental health and an essential intrinsic protective factor in maintaining the typical development of an individual’s socially adaptive functioning10. Psychological resilience is influenced by both internal and external factors. Internal factors, such as an individual’s emotions, personality traits, and coping strategies, play a significant role in shaping their resilience. External factors, including family relationships, social environment, biological factors, educational background, and social support, also contribute to an individual’s level of resilience. These factors interact in complex ways to determine a person’s overall resilience11.
Depression is a common but serious mood disorder that can cause severe symptoms and affect how one felt, thought, and handled daily activities, such as sleeping, eating, and working. An individual who is depressed might experience insomnia, hopelessness about the future, dysphoria so painful that it hurt, impaired ability to concentrate, lack of joy and pleasure, and feelings of guilt and worthlessness. These symptoms could further result in the wish to die12. Depressive symptoms are a common psychiatric disorder among MSM with HIV-positive status13. These mental health problems may influence their sexual behavioural patterns, increase the risk of high-risk sexual behaviour and reduce the effectiveness of HIV interventions14. It is therefore important to consider mental health problems in the MSM population and their association with high-risk sexual behaviour in order to develop effective comprehensive interventions.
Social support refers to the psychological and material comfort that an individual receives through connections with others, groups, and the broader community. It was essential for maintaining both mental and physical well-being and could manifest in various forms, such as advice, guidance, understanding, or practical help. Social support had been characterized as the resources and assistance that an individual could access through social networks and relationships. It included emotional, instrumental, informational, and companionship supports. These forms of support collectively contributed to an individual’s overall resilience and well-being15,16.
Self-esteem refers to an individual’s subjective evaluation of their own worth and capabilities. It typically encompasses cognitive and emotional responses to aspects such as one’s appearance, abilities, achievements, and social status. Self-esteem reflects a person’s overall attitude toward themselves and is a core component of self-concept. Individuals with high self-esteem usually held positive views of themselves, feeling confident and valuable. In contrast, those with low self-esteem might have negative self-perceptions, feeling insecure and lacking in worth17.
Many researchers have studied the psychological resilience and its influencing factors in the MSM population using non-machine learning methods like traditional statistics, qualitative research, and mixed methods6,10,18,19. Sun et al.10 used SEM to explore how psychological resilience mediates the link between social support and anxiety/depression in Chinese HIV-positive individuals, including MSM. Chung et al.18 applied correlation and regression analyses to investigate the relationships among psychological resilience, self-esteem, and depressive symptoms. Armstrong et al.19. employed longitudinal data analysis to track long-term depression patterns in MSM. Pan et al.6 conducted descriptive and regression analyses to evaluate anxiety, depression, and their influencing factors in MSM, revealing several mental health-related factors such as social support and self-esteem. These studies exemplify the use of traditional and qualitative methods in analyzing MSM’s mental health and psychological resilience. Unlike traditional statistical methods, machine learning excels at handling complex data patterns, nonlinear relationships, and high-dimensional data, which pose challenges for traditional methods. When analyzing psychological resilience and its influencing factors in the MSM population, machine learning can more precisely identify complex interactions among multiple factors.
The use of machine learning techniques has become increasingly common in clinical practice20,21,22,23,24. These techniques have been used in a number of areas, including the development of decision tree algorithms for the diagnosis of cancer and Alzheimer’s disease20. the prediction of diabetes21the prediction of mortality rates in patients with coronavirus disease 2019 (COVID-19)22. and the evaluation of the cost-effectiveness of yellow fever vaccines23. Logistic regression has also been widely used to determine the prevalence and correlates of anxiety and depression24, to predict lung metastases in patients with colorectal cancer25, and to determine the prevalence and clinical correlates of post-stroke behavioural disorder syndrome26. Given that decision trees are prone to overfitting and have limitations in feature selection, while logistic regression demands high linear independence among features and may have limited accuracy in probability output, combining these two methods can effectively address their respective shortcomings27. While a combination of the two methods has been used to predict mild cognitive impairment in the elderly and to predict acute respiratory failure in patients with pancreatitis28,29, the combination of the two methods to assess psychological resilience and factors influencing it in the MSM population has not yet been reported, despite extensive searches of several databases, including Pubmed. In light of the above considerations, the present study used the Chi-square Automatic Interaction Detector (CHAID) decision tree algorithm in conjunction with multivariable ordinal logistic regression to assess the psychological resilience status of the MSM population and identify the associated influencing factors. This will serve as a basis for improving the psychological resilience of the MSM population, addressing the mental health concerns of the MSM population, and developing HIV prevention and intervention strategies.
Subjects and methods
We conducted a cross-sectional network survey conducted in the first half of 2024. We made full use of the Internet-based comprehensive service platform for the MSM population for HIV prevention and control (Sunshine Measure) to distribute questionnaires we designed to respondents through social platforms such as WeChat groups and QQ groups within the MSM community. This approach ensured broader reach and more precise targeting of respondents, thus facilitating the acquisition of a sufficient MSM sample. We ensured that that the completion and return of questionnaires were anonymous to protect individual privacy. In this study, we enrolled a convenience sample of MSM as participants. We recruited participants online mainly from Zhejiang Province, China, with a few from other provinces, based on their IP addresses. We collected the questionnaire via the Golden Data website (www.jinshuju.com), which operated exclusively within the Enterprise WeChat environment. This approach was taken to ensure the privacy of the data collected. Additionally, We implemented an incentive policy to boost participation among the MSM population and encourage respondents to complete the questionnaire in a timely manner. Upon completion of the survey, we rewarded each participant with a 10 RMB gift, such as phone recharge voucher. We allowed each IP address to be completed only once and not repeated. Prior to participation, we obtained informed consent was from respondents, who were informed of their right to refuse the survey at any time. For this survey, six trained professional MSM workers were employed to collect the questionnaires and to carry out quality control of the data in the questionnaire.
The inclusion criteria for participants in this study were as follows: (1) identifying as MSM, including gay men, bisexual men, heterosexual men and transgender men; (2) being aged 18 years or older; (3) having the ability to read and complete the questionnaire; (4) being able to use a mobile phone correctly; (5) informed consent for this study and voluntarily participating. Exclusion criteria were as follows: Any entries that were incomplete, contained logical inconsistencies, or were completed in an unrealistically short time (e.g., less than 30 s) were excluded from the analysis.
The questionnaire was designed by the researchers themselves. This questionnaire was specifically designed for the MSM population and utilized a closed-ended format. The survey commenced with an introduction that emphasized its purpose and importance. Respondents were reassured of complete anonymity and robust privacy protection measures. Only after granting informed consent could participants proceed to complete the questionnaire. The questionnaire consisted of three main sections: basic socio-demographic information about the respondents, HIV-related information and psychological scales. The first section included items on basic demographic information such as age, occupation, marital status, education, personal income, religious beliefs, employment status, place of residence and so on. The second section focused on HIV-related information, including HIV test status, syphilis test status, hepatitis C test status, anti-HIV drug use status, history of sex with men, history of sex with women, and HIV disclosure status. The third section contained the psychological scales, including the Social Support Scale, the Self-Esteem Scale, the Patient Health Questionnaire (PHQ-9) scale, and the Psychological Resilience Scale.
The Psychological Resilience Scale-25 consisted of 25 items presented on a 5-point Likert scale30. The total score was 100. A score of ≤ 60 indicated poor psychological resilience, 61–69 indicated moderate psychological resilience, 70–79 indicated good psychological resilience and ≥ 80 indicated excellent psychological resilience.The PHQ-9 scale consisted of nine items. Each item was given a score of 0, 1, 2 or 3, and the total score was obtained by summing the scores of the nine items, with a total score of 2731. A score of 0–4 indicated no depressive symptoms, a score of 5–9 indicated mild depressive symptoms, a score of 10–14 indicated moderate depressive symptoms, and a score of 15–21 indicated severe depressive symptoms. In this study, a score of ≥ 10 was used as the threshold for the presence of depressive symptoms. The Social Support Scale consisted of 12 items and was scored on a seven-point scale32. The total score was obtained by summing the scores of the 12 items, with a total score of 84. According to the classification system, scores of 12–36 indicated low support status, 37–60 indicated medium support status, and 61–84 indicated high support status. The Self-Esteem Scale consisted of 10 items, each of which was scored on a four-point scale, resulting in a total score of 4033. A score of ≤ 25 indicated low self-esteem, 26–32 indicated moderate self-esteem, and a score of ≥ 33 indicated high self-esteem. The four scales had been extensively used among a wide range of populations, including MSM population, and have consistently shown strong reliability and validity30,31,32,33.
Statistical methods
We conducted the statistical analysis using the SPSS 26.0 software. We expressed count data as the number of participants (percentage), and employed the chi-squared test to compare the groups. We used multivariable ordinal logistic regression to analyse the factors associated with psychological resilience in the MSM population sample. We included the variables that were significant in the bivariate analyses in the multivariable ordinal logistic regression analyses. Differences were considered statistically significant at P < 0.05.
A decision tree algorithm was a method of data analysis that used a tree-like structure to represent decisions and their associated outcomes. We used CHAID decision tree model to analyse the factors influencing psychological resilience in the MSM population sample, with psychological resilience as the dependent variable and the variables that were significant in the bivariate analyses as the independent variables. We set the parameters of the CHAID decision tree model as follows: the significance level of split nodes and merged categories of the tree was set at 0.05. The decision tree had three layers, with a minimum of 50 cases in the parent nodes and 30 in the child nodes. If the sample size of a node did not meet the minimum requirement, the node was designated as an end node and no further splitting was performed22.
Ethical review
The Medical Ethics Committee of our hospital (Grant No. 2023014) granted ethical approval for this study. We conducted research in line with the Declaration of Helsinki and Good Clinical Practice. Prior to commencement, we obtained informed consent from each participant. In the event that informed consent was not obtained from the respondents, We did not permit them to participate in the study.
Results
Demographic characteristics of the MSM population sample
We collected data from a total of 1113 participants of MSM data, but excluded 43 participants due to incomplete data or logical errors. We included a total of 1070 participants in the analysis of this study. Of these, 579 participants (54.11%) were aged 20–29 years, 183 participants (17.10%) were married, 170 participants (15.89%) were professional personnel and 443 participants (41.40%) had a university degree or higher; 400 participants (37.38%) had a monthly income of ≥ 6,000 RMB, while 709 participants (66.26%) lived in rural areas. The majority of participants were employed (763, 71.31%) and 256 participants (23.93%) identified as Buddhist. The number of individuals tested for HIV, syphilis and hepatitis C was 939 (87.76%), 834 (77.94%) and 803 (75.05%), respectively. Of the total participants, 664 (62.06%) reported sexual intercourse with men in the previous six months, while 129 (12.06%) reported sexual intercourse with women in the same period. Among the 1070 respondents, 910 (85.05%) were from Zhejiang Province, and 160 (14.95%) were from the other 19 provinces. See Table 1.
Chi-squared or Fisher’s exact test of psychological resilience by subgroup
We conducted a chi-squared or Fisher’s exact test of psychological resilience by subgroup. The results demonstrated that education (P = 0.001), disclosure of test results (P < 0.018), place of residence (P < 0.025), self-esteem (P < 0.0001), depression (P < 0.001) and social support (P < 0.001) were associated with psychological resilience in the MSM population sample. See Table 1. Other variables were not found to be associated with psychological resilience in the MSM population (all P > 0.05).
Multivariable ordinal logistic regression analysis
We employed a multivariable ordinal logistic regression model to examine the influence of several independent variables on psychological resilience. These variables included social support, self-esteem, depressive symptoms, and educational background. Psychological resilience was categorized into four ordered levels: low, medium, high, and extremely high, with the extremely high-resilience group serving as the reference category. Our analysis revealed that a number of these independent variables significantly affected psychological resilience. Specifically, individuals with a high school education demonstrated significantly lower psychological resilience compared to those with a university education or above (β =−0.508, P = 0.020, Exp(B) = 0.602). When compared to the high-social-support group, both the low-social-support group (β =−1.666, P = 0.000, Exp(B) = 0.189) and the medium-social-support group (β =−0.967, P = 0.000, Exp(B) = 0.380) exhibited significantly lower psychological resilience. Furthermore, individuals without depressive symptoms showed significantly higher psychological resilience than those with such symptoms (β = 0.608, P = 0.002, Exp(B) = 1.836). Additionally, both the low-self-esteem group (β =−2.564, P = 0.000, Exp(B) = 0.077) and the medium-self-esteem group (β =−1.902, P = 0.000, Exp(B) = 0.149) had significantly lower psychological resilience compared to the high-self-esteem group. See Table 2 for further details.
CHAID decision tree model analysis
The results of the CHAID decision tree indicated that in the MSM group, the rates of low, medium, high, and extremely high psychological resilience were 70.0%, 11.7%, 10.4%, and 8.5%, respectively, This indicates a high incidence of low psychological resilience. Self-esteem, depression and social support were closely associated with low psychological resilience in the MSM population sample. In the decision tree, self-esteem was the primary influencing factor. The poor resilience rates were 87.0%, 69.3% and 17.1% for the MSM population sample with low self-esteem, moderate self-esteem and high self-esteem, respectively. The second layer of the decision tree identified depression and social support as secondary influencing factors. Among MSM with low self-esteem, those with depression had a 92.5% rate of low psychological resilience, compared to 80.5% for those without depression. Also, among MSM with low self-esteem, those with low to moderate social support had a 76.5% rate of medium psychological resilience, versus 48% for those with high social support. See Fig. 1.
Discussions
The primary objective of this study was to evaluate the psychological resilience of the MSM population and identify the key factors that influence it. The MSM population is particularly vulnerable to mental health issues such as depression2,3. Therefore, understanding the determinants of psychological resilience is essential for developing targeted interventions. Numerous traditional statistical methods have been employed to investigate the psychological resilience and its influencing factors in the MSM population6,10,18,19. However, as data on psychological resilience in the MSM population often exhibits complexity, including nonlinear relationships and high-dimensionality, these traditional methods are less effective. In contrast, machine learning methods can efficiently manage such data34. This study employed both the CHAID decision tree algorithm and logistic regression, leveraging their combined strengths to provide a comprehensive analysis of how social support, self-esteem, depression, and education impact psychological resilience in this population. The findings aim to inform policy-making and guide the implementation of effective mental health and HIV prevention strategies for MSM.
In the present study, among the 1,070 participants from the MSM population sample, 749 individuals with low psychological resilience (scoring ≤ 60 points) were identified, accounting for 70.0% of the MSM sample. This suggests that the psychological resilience of this population is relatively low. It is recommended that a variety of strategies and measures be used to increase the psychological resilience of this population in the future. These strategies and measures include: (1) psychological education and awareness enhancement: Conduct mental health education activities through online and offline mental health lectures, workshops, and training courses to improve the understanding of psychological resilience among the MSM population35. Meanwhile, provide mental health information resources, develop mental health handbooks and online resources specifically for the MSM population to help them understand how to cope with stress and enhance psychological resilience; (2) strengthen social support networks: Establish community support groups, organize and support mutual aid groups within the MSM community to provide a safe environment where members can share experiences and support each other. In addition, enhance cooperation with mental health institutions to provide professional psychological counseling services for the MSM population; (3) skill training: Conduct stress management training to help the MSM population learn effective coping skills, such as meditation, deep breathing, and mindfulness exercises36. Furthermore, social skills training can be provided to help the MSM population build a broader social network and strengthen their social support system; (4) policy and environmental interventions: Advocate for inclusive policies and encourage policymakers to develop and implement policies that reduce discrimination and prejudice against the MSM population;37 improve the community environment through community activities and projects to enhance the living environment of the MSM population and reduce social pressure.
Our findings underscore that depression, social support, self-esteem, and educational background are closely linked to low psychological resilience in this population. It has been shown that there is a significant negative correlation between psychological resilience and depression14,18,25. The prevalence of depression in the MSM population is higher than in the general population38. The prevalence of depression in the present study was 28.9%, which is similar to the 26.2% reported by Wang in the MSM population39. Individuals with depressive disorders typically have reduced levels of psychological resilience, suggesting that they have a reduced ability to cope with stressors and are more vulnerable to the onset of depressive episodes. Furthermore, psychological resilience has a partial mediating effect on the relationship between positive coping and depressive mood40. This suggests that psychological resilience not only influences depressive mood directly, but also indirectly by influencing coping styles. Consequently, enhancing psychological resilience is an effective approach to improving depressed mood in depressed patients. This can be achieved by strengthening social support, promoting self-esteem and developing positive coping strategies.
In the MSM population, the relationship between social support and psychological resilience showed a significant positive correlation41. with lower levels of social support reducing the level of psychological resilience in the MSM, which in turn affected their psychological mood. Hussain et al.42 reported that the majority of the MSM in Pakistan lacked family support, either emotional or financial. Specifically, 76% of MSM received no financial support from their families. In addition, 29.45% of MSM did not receive family support after disclosing their sexual orientation. Liu et al.41. showed that 34.50% of the MSM had low social support, whereas the prevalence of low social support in the MSM population sample of the present study was 12.90%, which is lower than the findings of both Liu et al.41. and Hussain et al.42. Social support can be conceptualised as a social network comprising three dimensions: family support, friend support and other forms of support (e.g. social relationships with neighbours, leaders, etc.)43. A significant positive correlation was found between all dimensions of social support and psychological resilience. It is therefore recommended that additional social support channels be made available to MSM, especially those who are HIV-positive, in order to increase their psychological resilience and reduce the prevalence of depression10.
There is a significant positive correlation between self-esteem and psychological resilience in the MSM population. Self-esteem can be defined as an individual’s assessment of their own worth and abilities. It plays an important protective role in the face of adversity. Individuals with high self-esteem tend to be more psychologically resilient and better able to cope with challenges and stress. This is particularly important for the MSM population, especially those who are HIV positive or depressed. Akhtar and Bilour44 conducted a study on the mental health status of the MSM population in Pakistan. They found that 29% of the MSM population had low levels of psychological resilience, while 74% had low to moderate levels of self-esteem. Notably, there was a significant positive correlation between their psychological resilience and self-esteem, and MSM living with a mentor had significantly higher levels of psychological resilience and self-esteem than those living alone or with friends. The present study showed that the prevalence of low self-esteem in the MSM population sample was 34.49%, which is slightly higher than that reported by Akhtar and colleagues44. A Classification Tree Analysis (CTA) showed that self-esteem was the most significant predictor of psychological resilience45, a finding consistent with the results of the present study. Consequently, it is imperative to implement strategies that promote psychological resilience in the MSM population in order to improve their mental health18.
Numerous studies have demonstrated a significant positive correlation between educational attainment and psychological resilience in the MSM population44,46,47. As an individual’s level of education increases, so does their psychological resilience, enabling highly educated individuals to cope with stress and adversity. Akhtar and Bilour44 have shown that educational attainment is significantly and positively associated with psychological resilience. Our study’s multivariable ordinal logistic regression results have also showed that education is significantly associated with psychological resilience after controlling for other variables, aligning with the findings of Akhtar and Bilour44. These findings have been confirmed in other populations as well46,47. This study underscores the importance of education in enhancing psychological resilience.
Logistic regression is a statistical method rooted in probability theory. It predicts the likelihood of a specific outcome by using a linear combination of independent variables to estimate the log-odds of the dependent variable48. The model is built on the assumption that there is a linear relationship between the log-odds of the dependent variable and the independent variables. Logistic regression’s coefficients directly indicate the extent of each independent variable’s influence on the dependent variable, making it particularly suitable for situations demanding clear explanations. In contrast, the CHAID decision tree is an algorithm that relies on chi-square test. It recursively partitions the data into a hierarchical structure to highlight differences among categorical variables49. The CHAID decision tree’s structure is visually intuitive and easy to grasp. It presents the data partitioning process and decision rules in a tree diagram, allowing researchers to readily understand the interplay between different factors. The CHAID decision tree excels at capturing non-linear relationships and interaction effects. For instance, it can discern the more pronounced negative impact of depression on psychological resilience when self-esteem is low, thanks to its hierarchical structure. In our study, both logistic regression and the CHAID decision tree pinpointed depression, social support, and self-esteem as pivotal factors shaping psychological resilience in the MSM community. However, logistic regression additionally revealed that education level significantly influences psychological resilience, a finding not identified by the CHAID decision tree. This discrepancy may be attributed to the logistic regression model’s ability to quantify linear relationships through estimated coefficients, whereas the CHAID decision tree is more adept at capturing non-linear relationships and interaction effects. Additionally, differences in variable selection and model interpretability may also contribute to these divergent results51. The integration of these two methods facilitates a comprehensive and nuanced analysis of psychological resilience and its determinants. This dual-method approach not only broadens the scope of understanding but also mitigates the risks associated with relying solely on one method, thereby safeguarding against the omission of critical insights52. Furthermore, it enhances the depth of inquiry into the underlying mechanisms that shape psychological resilience.
Logistic regression has been used in a number of studies examining psychological resilience in diverse populations53,54. Similarly, the CHAID decision tree algorithm has been used in studies of psychological resilience in college students and older adults55,56. Some researchers have integrated decision trees with logistic regression to predict diseases and associated factors57,58,59,60, such as non-suicidal self-injury in adolescents57, the association between anthropometric measures and total cholesterol in a large population58, HIV infection in the MSM population59, and suicidal ideation in psychiatric patients60. The combination of these two methods has not been used in studies of psychological resilience and its determinants in the MSM population, according to a search of several databases, including PubMed. In our study, a CHAID decision tree combined with logistic regression are used to assess the factors influencing psychological resilience in the MSM population sample. The results of both methods indicated that depression, social support and self-esteem are significantly correlated with psychological resilience. The results of the two machine learning models show high consistency and good performance.
The generalizability of our findings should be approached with caution. The sample, drawn from specific online platforms and social media groups, may not fully represent the entire MSM population due to differences in regional characteristics, socioeconomic status, culture, and HIV prevalence. Additionally, the study’s main focus on Zhejiang, China, could limit the broader applicability of the results. Given these limitations, caution is advised when extending these conclusions to other regions or countries. MSM in different regions may vary significantly in social support, self-esteem, depression, and education levels, all of which in turn affect psychological resilience. Moreover, reliance on self-reported data may introduce bias, which could affect the accuracy and generalizability of the results. To address these limitations, further longitudinal studies are essential to explore the causal relationships between the identified factors and psychological resilience in the MSM population. Additionally, it is recommended to conduct intervention studies to evaluate the effectiveness of educational programs and social support initiatives in enhancing psychological resilience.
Study limitations
The following limitations are inherent to this study: (1) The presence of depressive symptoms, self-esteem, social support and HIV status in our study was determined through self-report by the study participants, which may have introduced information bias, including recall bias, subjectivity bias, and reporting bias, among others, For example, given that the content of this survey is based on self-reports, reporting bias may occur. Participants may report having stronger social support, higher self-esteem, and so on; (2) As this study was a cross-sectional network survey, causal inferences cannot be made based on the results obtained; (3) Due to the need to protect the privacy of the study participants and maintain the confidentiality of the data, some potentially influential factors, such as social discrimination, mental health history, and the details of the social support network (including family, friends, and community support), were not included in this study; and (4) The respondents were required to recall their sexual behaviour over the past six months, which may be subject to recall bias.
Conclusions
In summary, this survey assessed the general demographic characteristics, HIV-related information and psychological status of a convenience sample of MSM population in Zhejiang and the other 17 provinces, China, during the first half of 2024. It used both CHAID decision tree modelling and multivariable ordinal logistic regression to determine the factors influencing psychological resilience in the MSM population. In this study, among the 1070 MSM participants, the prevalence rates were as follows: depression at 28.9%, HIV at 3.4%, low social support at 12.90%, low self-esteem at 34.49%. The CHAID decision tree algorithm coupled with the multivariable ordinal logistic regression model in our study showed that the factors influencing psychological resilience in the MSM population sample were depression, social support, self-esteem and educational attainment. The results of this study can provide a scientific basis for government and relevant agencies to inform decision-making and the implementation of appropriate interventions for the MSM population, with the aim of enhancing their psychological resilience, promoting their physical and mental health, and reducing the incidence and prevalence of sexually transmitted diseases such as AIDS.
Data availability
The datasets used and analyzed in this study are available from the corresponding author on reasonable request. Because of the sensitive nature of the data collected on the mental health of MSMs among which individuals are potentially identifiable, we cannot provide open access to our data.
References
Beyrer, C. et al. Global epidemiology of HIV infection in men who have sex with men. Lancet 380 (9839), 367–377. https://doi.org/10.1016/S0140-6736(12)60821-6 (2012).
Korenromp, E. L. et al. New HIV infections among key populations and their partners in 2010 and 2022, by world region: A multisources Estimation. J. Acquir. Immune Defic. Syndr. 95 (1S), e34–e45. https://doi.org/10.1097/QAI.0000000000003340 (2024).
UNAIDS. 2024 Global AIDS Update. (Joint United Nations Programme on HIV/AIDS, 2024). https://www.unaids.org/en/resources/documents/2024/global-aids-update-2024.
Mijas, M. Health determinants in men of the bear subculture compared with the MSM population. Literature review. Psychiatr Pol. 56 (3), 635–646. https://doi.org/10.12740/PP/OnlineFirst/127468 (2022).
Nouri, E., Moradi, Y. & Moradi, G. What is the global prevalence of depression among men who have sex with men? A systematic review and meta-analysis. Ann. Gen. Psychiatry 21(1), 38. https://doi.org/10.1186/s12991-022-00414-1 (2022).
Pan, H., Lin, B., Shi, G., Ma, Y. & Zhong, X. Anxiety and depression status and influencing factors of MSM in the post-COVID-19 epidemic period: A cross-sectional study in Western China. Am. J. Mens Health. 15 (6), 15579883211057701. https://doi.org/10.1177/15579883211057701 (2021).
Ranuschio, B. et al. Promoting resilience among middle-aged and older men who have sex with men living with HIV/AIDS in Southern nevada: an examination of facilitators and challenges from a social determinants of health perspective. Healthc. (Basel). 11 (20), 2730. https://doi.org/10.3390/healthcare11202730 (2023).
Gervolino, S. C., Krause, K. D. & Halkitis, P. N. The role of social support networks in a sample of older adults living with HIV: The GOLD studies. AIDS Care. 1–8. https://doi.org/10.1080/09540121.2024.2312877 (2024).
Krause, K. D. & Halkitis, P. N. Toward a more dynamic Understanding of the influence of resilience on health. Behav. Med. 46 (3–4), 171–174. https://doi.org/10.1080/08964289.2020.1790972 (2020).
Sun, Y. et al. The mediating effect of psychological resilience between social support and anxiety/depression in people living with HIV/AIDS-a study from China. BMC Public. Health. 23 (1), 2461. https://doi.org/10.1186/s12889-023-17403-y (2023).
Hale, F. B., Lim, E., Griffin, C. & Fontenot, H. B. Factors contributing to well-being among hospital-based nurses. Worldviews Evid. Based Nurs. 22 (2), e70019. https://doi.org/10.1111/wvn.70019 (2025).
Bozzay, M. L., Karver, M. S. & Verona, E. Linking insomnia and suicide ideation in college females: the role of socio-cognitive variables and depressive symptoms in suicide risk. J. Affect. Disord. 199, 106–113. https://doi.org/10.1016/j.jad.2016.04.012 (2016).
Ahaneku, H. et al. Depression and HIV risk among men who have sex with men in Tanzania. AIDS Care. 28 (Suppl 1), 140–147. https://doi.org/10.1080/09540121.2016.1146207 (2016).
Dong, M. J. et al. The prevalence of HIV among MSM in china: a large-scale systematic analysis. BMC Infect. Dis. 19 (1), 1000. https://doi.org/10.1186/s12879-019-4559-1 (2019).
Stice, E., Ragan, J. & Randall, P. Prospective relations between social support and depression: differential direction of effects for parent and peer support? J. Abnorm. Psychol. 113, 155–159. https://doi.org/10.1037/0021-843X.113.1.155 (2004).
Taylor, S. E. Social support: A review. In The Oxford Handbook of Health Psychology (ed Friedman, H. S.). 189–214. (Oxford University Press, 2011).
Yalçınkaya-Alkar, Ö. Is self esteem mediating the relationship between cognitive emotion regulation strategies and depression? Curr. Psychol. 39, 220–228. https://doi.org/10.1007/s12144-017-9755-9 (2020).
Chung, J. et al. Relationships among resilience, self-esteem, and depressive symptoms in Chinese adolescents. J. Health Psychol. 25 (13–14), 2396–2405. https://doi.org/10.1177/1359105318800159 (2020).
Armstrong, N. M. et al. Optimal metrics for identifying long term patterns of depression in older HIV-infected and HIV-uninfected men who have sex with men. Aging Ment Health. 23 (4), 507–514. https://doi.org/10.1080/13607863.2017.1423037 (2019).
Verda, D., Parodi, S., Ferrari, E. & Muselli, M. Analyzing gene expression data for pediatric and adult cancer diagnosis using logic learning machine and standard supervised methods. BMC Bioinform. 20 (Suppl 9), 390. https://doi.org/10.1186/s12859-019-2953-8 (2019).
Liu, S. et al. Application of three statistical models for predicting the risk of diabetes. BMC Endocr. Disord. 19 (1), 126. https://doi.org/10.1186/s12902-019-0456-2 (2019).
Mohammadi-Pirouz, Z., Hajian-Tilaki, K., Sadeghi Haddat-Zavareh, M., Amoozadeh, A. & Bahrami, S. Development of decision tree classification algorithms in predicting mortality of COVID-19 patients. Int. J. Emerg. Med. 17 (1), 126. https://doi.org/10.1186/s12245-024-00681-7 (2024).
Kieffer, A. et al. The public health benefits and economic value of routine yellow fever vaccination in Colombia. Value Health Reg. Issues. 20, 60–65. https://doi.org/10.1016/j.vhri.2019.01.004 (2019).
Farooq, S., Khan, T., Zaheer, S. & Shafique, K. Prevalence of anxiety and depressive symptoms and their association with Multimorbidity and demographic factors: a community-based, cross-sectional survey in karachi, Pakistan. BMJ Open. 9 (11), e029315. https://doi.org/10.1136/bmjopen-2019-029315 (2019).
Hu, T. et al. CT morphological features integrated with whole-lesion histogram parameters to predict lung metastasis for colorectal cancer patients with pulmonary nodules. Front. Oncol. 9, 1241. https://doi.org/10.3389/fonc.2019.01241 (2019).
Tang, W. K. et al. Prevalence and clinical correlates of poststroke behavioral dysexecutive syndrome. J. Am. Heart Assoc. 8 (22), e013448. https://doi.org/10.1161/JAHA.119.013448 (2019).
Rimal, Y. et al. Comparative analysis of heart disease prediction using logistic regression, SVM, KNN, and random forest with cross-validation for improved accuracy. Sci. Rep. 15, 13444. https://doi.org/10.1038/s41598-025-93675-1 (2025).
Song, Y., Yuan, Q., Liu, H., Gu, K. & Liu, Y. Machine learning algorithms to predict mild cognitive impairment in older adults in china: A cross-sectional study. J. Affect. Disord. 368, 117–126. https://doi.org/10.1016/j.jad.2024.09.059 (2025).
Zhou, L. X. et al. Machine learning predicts acute respiratory failure in pancreatitis patients: A retrospective study. Int. J. Med. Inf. 192, 105629. https://doi.org/10.1016/j.ijmedinf.2024.105629 (2024).
Sauceda, J. A., Wiebe, J. S. & Simoni, J. M. Childhood sexual abuse and depression in Latino men who have sex with men: does resilience protect against nonadherence to antiretroviral therapy? J. Health Psychol. 21 (6), 1096–1106. https://doi.org/10.1177/1359105314546341 (2016).
Zhou, Y., Zhang, Z., Li, Q., Mao, G. & Zhou, Z. Construction and validation of machine learning algorithm for predicting depression among home-quarantined individuals during the large-scale COVID-19 outbreak: based on adaboost model. BMC Psychol. 12 (1), 230. https://doi.org/10.1186/s40359-024-01696-8 (2024).
Eto, M. et al. Coping flexibility and associated factors after gastrectomy in patients with gastric cancer: A cross-sectional multisite study. Asia Pac. J. Oncol. Nurs. 12, 100627. https://doi.org/10.1016/j.apjon.2024.100627.( (2024).
Frankova, I. et al. Psychometric properties of the revised Ukrainian version of the continuous traumatic stress response scale (CTSR) in the context of the Russo-Ukrainian war. Eur. J. Psychotraumatol. 16 (1), 2463186. https://doi.org/10.1080/20008066.2025.2463186 (2025).
Zhang, L. et al. Predicting depression and unravelling its heterogeneous influences in middle-aged and older people populations: a machine learning approach. BMC Psychol. 13 (1), 395. https://doi.org/10.1186/s40359-025-02691-3 (2025).
Kirnan, J., Fotinos, G., Pitt, K. & Lloyd, G. School-based mental health education: program effectiveness and trends in help-seeking. Int. J. Environ. Res. Public. Health. 22 (4), 523. https://doi.org/10.3390/ijerph22040523 (2025).
Foster, K. et al. A mixed methods study of wellbeing and resilience of undergraduate nursing students: implications for the post-pandemic era. BMC Nurs. 24, 409. https://doi.org/10.1186/s12912-025-03066-0 (2025).
Liu, Y., Zhang, J. & Cai, Y. Mpox-related stigma and healthcare-seeking behavior among men who have sex with men. Glob Health Res. Policy. 10 (1), 16. https://doi.org/10.1186/s41256-025-00418-w (2025).
Tao, J. et al. Impact of depression and anxiety on initiation of antiretroviral therapy among men who have sex with men with newly diagnosed HIV infections in China. AIDS Patient Care STDS. 31 (2), 96–104. https://doi.org/10.1089/apc.2016.0214 (2017).
Wang, D., Scherffius, A., Ouyang, X. & Deng, Q. Family functioning and depressive symptoms among HIV-positive men who have sex with men: mediating roles of stigma and resilience. Psychol. Res. Behav. Manag. 17, 755–764. https://doi.org/10.2147/PRBM.S449825 (2024).
Lu, C., Yuan, L., Lin, W., Zhou, Y. & Pan, S. Depression and resilience mediates the effect of family function on quality of life of the elderly. Arch. Gerontol. Geriatr. 71, 34–42. https://doi.org/10.1016/j.archger.2017.02.011 (2017).
Liu, X. H. et al. Understanding the impact of social support on stress response during the epidemic: the mediating role of shame and loneliness. Chin. J. Clin. Psychol. 30 (3), 744–748 (2022). (in chinese).
Hussain, A., Rahim, A. & Rajput, F. The quality of life of HIV positive transgender and homosexual population in karachi, Pakistan. Pak J. Med. Sci. 39 (4), 1202–1207. https://doi.org/10.12669/pjms.39.4.6445 (2023).
Chernick, R. et al. Demographics and use of an addiction helpline for concerned significant others: observational study. J. Med. Internet Res. 27, e55621. https://doi.org/10.2196/55621 (2025).
Akhtar, M. & Bilour, N. State of mental health among transgender individuals in pakistan: psychological resilience and self-esteem. Community Ment Health J. 56 (4), 626–634. https://doi.org/10.1007/s10597-019-00522-5 (2020).
Blanco, V., Vázquez, F. L., Guisande, M. A., Sánchez, M. T. & Otero, P. Identification of non-professional caregivers with high resilience using sociodemographic, care, and personal and social development variables. Aging Ment Health. 24 (7), 1088–1097. https://doi.org/10.1080/13607863.2019.1566814 (2020).
Wei, H. et al. Impacts of nursing student burnout on psychological well-being and academic achievement. J. Nurs. Educ. 60 (7), 369–376. https://doi.org/10.3928/01484834-20210616-02 (2021).
Abdolrezapour, P., Jahanbakhsh Ganjeh, S. & Ghanbari, N. Self-efficacy and resilience as predictors of students’ academic motivation in online education. PLoS One. 18 (5), e0285984. https://doi.org/10.1371/journal.pone.0285984 (2023).
Ghesquière, L. et al. Heart rate markers for prediction of fetal acidosis in an experimental study on fetal sheep. Sci. Rep. 12 (1), 10615. https://doi.org/10.1038/s41598-022-14727-4 (2022).
Maimaitituerxun, R. et al. Predictive model for identifying mild cognitive impairment in patients with type 2 diabetes mellitus: A CHAID decision tree analysis. Brain Behav. 14 (3), e3456. https://doi.org/10.1002/brb3.3456 (2024).
Choi, H. Y., Kim, E. Y. & Kim, J. Prognostic factors in diabetes: comparison of Chi-square automatic interaction detector (CHAID) decision tree technology and logistic regression. Med. (Baltim). 101 (42), e31343. https://doi.org/10.1097/MD.0000000000031343 (2022).
Vargas, P., Maldonado-Diaz, M. & Gutiérrez-Panchana, T. Early prediction of functional mobility severity after stroke: two key milestones. J. Neurol. Sci. 15, 466:123278. https://doi.org/10.1016/j.jns.2024.123278 (2024).
Zhang, X. et al. Identifying the predictors of severe psychological distress by auto-machine learning methods. Inf. Med. Unlocked. 39, 101258. https://doi.org/10.1016/j.imu.2023.101258 (2023).
Jefferies, P., Ungar, M., Aubertin, P. & Kriellaars, D. Physical literacy and resilience in children and youth. Front. Public. Health. 7, 346. https://doi.org/10.3389/fpubh.2019.00346 (2019).
Park, S., Kim, S. Y., Lee, E. S. & Jun, J. Y. Factors related to change in depression among North Korean refugee youths in South Korea. Int. J. Environ. Res. Public. Health. 16 (23), 4624. https://doi.org/10.3390/ijerph16234624 (2019).
Song, P. et al. Analyzing psychological resilience in college students: A decision tree model. Heliyon 10 (11), e32583. https://doi.org/10.1016/j.heliyon.2024.e32583 (2024).
Ceolini, E., Ridderinkhof, K. R. & Ghosh, A. Age-related behavioral resilience in smartphone touchscreen interaction dynamics. Proc. Natl. Acad. Sci. U S A. 121 (25), e2311865121. https://doi.org/10.1073/pnas.2311865121 (2024).
Chen, W., Gao, Y. & Xiao, S. Predicting non-suicidal self-injury among Chinese adolescents: the application of ten algorithms of machine learning. Heliyon 10 (18), e37723. https://doi.org/10.1016/j.heliyon.2024.e37723 (2024).
Yousefabadi, S. A. et al. Evaluating the association of anthropometric indices with total cholesterol in a large population using data mining algorithms. J. Clin. Lab. Anal. 38 (17–18), e25095. https://doi.org/10.1002/jcla.25095 (2024).
He, J. et al. Application of machine learning algorithms in predicting HIV infection among men who have sex with men: model development and validation. Front. Public. Health. 10, 967681. https://doi.org/10.3389/fpubh.2022.967681 (2022).
Yu, H. et al. Factors related to suicidal ideation of schizophrenia patients in china: a study based on decision tree and logistic regression model. Psychol. Health Med. 29 (7), 1281–1295. https://doi.org/10.1080/13548506.2023.2301225 (2024).
Funding
This work was financially supported by 2022 Ministry of Education of China Humanities and Social ScienceYouth Foundation Project (22YJC790189), Shanghai Key Laboratory of Urban Design and Urban Science, NYUShanghai Open Topic Grants (Grant No.2023YWZhou_LOUD), Zhejiang Provincial Clinical Research Centerfor Mental Disorders Foundation Project (SLC202309), Shanghai University Young Teachers Cultivation andSupport Project, Wenzhou Science and Technology Bureau Science and Technology ProgramProject (Y20240642), and National Social Science Foundation of China Post-funding Project (24FJB002) .These funders had no role in study design, data collection and analysis, decision to publish, or preparationof the manuscript.
Author information
Authors and Affiliations
Contributions
Yi-Wei Zhou and Zumu Zhou designed the study. Min-Lu Xu disseminated the questionnaire. Zejie Zhang and Fang-Lv Xiang analyzed the data. Yiwei Zhou wrote a draft of the manuscript.Zu-Mu Zhou interpreted the data and revised the manuscript. All authors read the manuscript and approved for the submission of it to Scientific Reports.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Zhou, Y., Zhang, Z., Xiang, F. et al. Assessing psychological resilience and its influencing factors in the MSM population by machine learning. Sci Rep 15, 24022 (2025). https://doi.org/10.1038/s41598-025-08551-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-025-08551-9