Impact statement
This article sheds light on the urgent issue of adolescent suicide in low- and middle-income countries (LMICs) like Ghana, where mental health support is often limited. By harnessing machine learning (ML), our research offers a groundbreaking approach to identifying young people at risk of suicide, moving beyond traditional methods that may miss critical warning signs. ML tools can help schools, community leaders and health workers quickly identify at-risk youth, even in areas with few trained professionals, enabling timely interventions that save lives. Moreover, this study advocates for the integration of technology with human expertise, ensuring that ML supports rather than replaces compassionate care. Our findings also emphasize the need for culturally tailored strategies, ensuring that solutions resonate with the unique social and emotional realities of Ghanaian adolescents. Ultimately, our work aims to reduce the tragic loss of adolescent lives to suicide, fostering hope and resilience in communities where such support is most needed.
Introduction
Suicide among adolescents is a pressing global public health issue, contributing significantly to mortality and morbidity during a critical developmental stage (Wasserman et al., Reference Wasserman, Cheng and Jiang2005). Adolescents are particularly vulnerable to suicidal ideation due to the interplay of psychosocial stressors, rapid developmental changes and limited access to mental health resources (Azasu et al., Reference Azasu, Quarshie, Messias, Larnyoh, Ali and Joe2024). Globally, suicide ranks as the second leading cause of death among individuals aged 10–24 years, underscoring the urgent need for evidence-based prevention strategies (WHO, 2020).
In Ghana, the burden of adolescent suicide is increasingly being recognized, with one out of five adolescents experiencing suicide ideation in the last 12 months (Azasu et al., Reference Azasu, Quarshie, Messias, Larnyoh, Ali and Joe2024). Ghana is faced with a high prevalence of suicidal behaviors among high school students, with 18.2%, 22.5% and 22.2% for suicidal ideation, suicidal plans and suicidal attempts, respectively (Oppong Asante et al., Reference Oppong Asante, Kugbey, Osafo, Quarshie and Sarfo2017; Azasu and Joe, Reference Azasu and Joe2023). Studies have found psychological and socio-ecological risk factors for suicide among these adolescents (Oppong Asante et al., Reference Oppong Asante, Kugbey, Osafo, Quarshie and Sarfo2017; Azasu et al., Reference Azasu, Quarshie, Messias, Larnyoh, Ali and Joe2024). These studies suggest that adolescents in Ghana face a complex interplay of psychological and socio-ecological challenges, including depression, anxiety, bullying and limited family support, which contribute to suicide ideation, plans and attempts. Despite the growing recognition of adolescent suicide as a critical issue, mental health resources in Ghana remain scarce, and traditional approaches to identifying suicide risk often fall short in addressing the multifaceted nature of this problem (Roberts et al., Reference Roberts, Mogan and Asare2014). These conventional methods, such as linear statistical models and manual clinical assessments, are not only limited in their ability to capture the complex interactions between risk factors but are also impractical for large-scale implementation in resource-constrained settings.
The advent of machine learning (ML) presents a transformative opportunity to address these limitations. Unlike traditional methods, ML techniques excel at analyzing large, complex datasets, identifying hidden patterns and modeling nonlinear relationships between variables (Rubinger et al., Reference Rubinger, Gazendam, Ekhtiari and Bhandari2023). These capabilities make ML particularly well suited for predicting suicide risk in Ghana, where multiple psychological and socio-ecological factors interact in dynamic and often nonlinear ways.
This study leverages a nationally representative dataset of nearly 2,000 Ghanaian adolescents to apply ML techniques for suicide risk prediction. By analyzing both psychological factors (e.g., depression symptoms, anxiety symptoms) and socio-ecological factors (e.g., bullying victimization, family support), this research aims to develop culturally relevant, data-driven insights to inform targeted and efficient interventions. This study is innovative in its application of ML to a nationally representative dataset of Ghanaian adolescents for suicide risk prediction, marking the first such effort in this context. By combining advanced computational methods with culturally specific data, the research addresses a critical gap in adolescent mental health assessment in LMICs.
Theoretical framework
This study is guided by the Socio-Ecological Model (SEM), which emphasizes the dynamic interplay between individual, relational, community and societal factors in shaping health behaviors and outcomes (Krug et al., Reference Krug, Mercy, Dahlberg and Zwi2002). The SEM provides a comprehensive framework for understanding adolescent suicidal ideation by considering how multiple layers of influence interact to increase or mitigate risk.
At the individual level, factors such as personal experiences of bullying victimization, food insecurity and emotional distress play a critical role in shaping mental health outcomes (Acquah et al., Reference Acquah, Wilson and Doku2014). These individual risk factors are compounded or alleviated by influences at the relational level, including parental support, peer interactions and family socio-economic status.
At the community level, the school environment, regional differences in access to resources and community attitudes toward mental health can either contribute to or protect against suicide risk. Finally, at the societal level, cultural norms, economic disparities and systemic inequities create a broader context within which individual and relational factors operate.
By applying this framework, the study seeks to identify not only the direct influences on suicidal ideation but also the interactions between various socio-ecological factors. This approach offers a holistic perspective, providing actionable insights for designing interventions that address risk at multiple levels (see Figure 1).

Figure 1. The socio-ecological model (Zollner et al., Reference Zollner, Fuchs and Fegert2014).
Aims of the study
The primary aim of this study is to utilize ML techniques to predict suicide risk among Ghanaian adolescents by analyzing a nationally representative dataset. The specific aims are as follows:
-
1. To identify key psychological and socio-ecological factors associated with suicide risk
-
2. To develop and evaluate ML models for suicide risk prediction
-
3. To determine the relative importance of psychological and socio-ecological risk factors
Methods
Study design and context
This study employed a cross-sectional survey design to examine the mental health and well-being of adolescents across Ghana. Data collection took place over a three-week period in October 2024, providing a comprehensive snapshot of adolescents’ emotional and psychological states. The study was conducted in junior high schools located in rural, peri-urban and urban areas and represented four major geographical regions of Ghana: the Northern, Eastern, Southern (Greater Accra and Eastern regions) and Middle (Ashanti region) belts. This regional sampling ensured that a broad spectrum of student experiences and educational contexts was captured.
Inclusion and exclusion criteria
The inclusion criteria for participation in this study required participants to be aged between 12 and 18 years, enrolled in a junior high school in Ghana, able to understand and provide informed assent or consent in English and available to participate during the designated data collection period in October 2024. Conversely, exclusion criteria encompassed students who were absent during data collection and those unable to provide informed assent or consent due to language barriers or cognitive limitations.
Participants and recruitment
A total of 1,850 students expressed interest in participating in the study. After screening for eligibility, 1,703 students completed the survey, yielding a participation rate of 92%. Students were recruited using stratified random sampling, ensuring that each region, as well as various socio-demographic groups (e.g., gender, socio-economic status), was adequately represented. Recruitment occurred through collaboration with school administrators and teachers, who helped identify eligible students from class rosters. Flyers and verbal presentations were used to provide information about the study’s goals and procedures. To prevent potential coercion by school authorities, participation was explicitly voluntary, and students were assured that their decision to participate or decline would not affect their academic standing or relationship with the school.
Informed consent and ethical approval
Prior to participation, written informed consent was obtained from parents or legal guardians, while students provided verbal or written assent. All participants were informed about the voluntary nature of participation, the right to withdraw at any time and the confidentiality of their responses. The study received approval from the Institutional Review Board (IRB) at the University at Buffalo. Ethical standards were maintained throughout the study to protect participants’ privacy, ensure data security and provide access to mental health resources in case of distress.
Incentives
No incentives, financial or otherwise, were provided to students before or during the consent process to ensure that participation was entirely voluntary and free from any potential financial coercion. Upon completion of measures, students were given notepads and pens.
Survey administration and instrumentation
Surveys were administered by trained research assistants during school hours in a controlled and quiet classroom setting. The average time to complete the survey was 30 min. The survey was presented in English, the primary language of instruction in Ghana’s junior high schools. The measures used in this study were tested and validated in a prior study conducted by the same research team in 2022 with 800 students from the Greater Accra region. The use of these pre-tested instruments ensured that the measures were culturally relevant, clear and reliable. To mitigate potential language barriers, research assistants were available to provide verbal explanations or clarifications in local languages as needed.
The survey included a range of measures assessing:
Demographics: Age, gender, living situation, educational level and ethnic group.
The World Health Organization Composite International Diagnostic Interview (WHO-CIDI) (Kessler and Üstün, Reference Kessler and Üstün2004) was used to assess suicidal behaviors. The scoring was binary (yes or no). The independent variables included psychological factors such as depression symptoms and anxiety symptoms, and socio-ecological factors such as perceived stress, social media addiction, trauma exposure and financial hardship (see Supplementary Appendix 1 for measurement details, scoring levels and citations).
Safety protocols
Given the sensitive nature of some of the survey questions, a comprehensive safety plan was in place. Research assistants were trained to recognize signs of emotional distress and provide immediate assistance. Students expressing significant psychological distress during or after the survey were referred to school counselors or mental health professionals. Additionally, participants were provided with contact information for national mental health hotlines and local support services. All participants were reassured about the voluntary nature of their participation and their right to withdraw at any time.
Data analysis
First, we performed descriptive statistics to summarize the characteristics of the study population. Chi-square tests were used to examine associations between categorical variables, while independent t-tests were used to compare means between groups.
For the ML analysis, we first cleaned the data and handled missing values. After evaluating the patterns of missingness, we opted to use listwise deletion to handle missing data, excluding cases with any missing values on the variables of interest from the analyses.
The data were then split into training (80%) and testing (20%) sets. Random forest captured complex, nonlinear relationships and predictor importance, while logistic regression provided interpretable odds ratios for clear associations. For logistic regression, suicide risk was coded as a binary outcome using the WHO-CIDI Suicidal Behaviors module (Kessler and Üstün, Reference Kessler and Üstün2004): ‘at risk’ (coded 1) for any ‘yes’ response to ideation, plans or attempts in the past 12 months and ‘not at risk’ (coded 0) for ‘no’ responses to all items. In the analysis, Likert scale measures were treated as continuous variables unless transformed into categorical or binary variables as specified, while the suicidal behavior variable from the WHO-CIDI was modeled as binary, with individual items (ideation, plans and attempts) combined into a single outcome where a ‘yes’ response was coded if any item was endorsed.
We applied both random forest and logistic regression models to identify factors associated with suicide risk. The relative importance of each risk factor was determined through feature importance analysis. Model performance was assessed using accuracy, sensitivity and specificity measures. All analyses were performed using Python’s scikit-learn library, with statistical significance set at p < .05.
Results
Descriptive statistics
A total of 1,736 adolescents participated in the study. The mean age of participants was 14.3 years (SD = 1.42, range = 12–18), with 58.7% identifying as female. Among the participants, 24.3% reported having suicide ideation, 18.2% reported making suicide plans and 12.5% reported suicide attempts in their lifetime.
Psychological and socio-ecological predictors of suicide risk
Correlations between key variables
Table 1 presents the correlations between independent variables and suicide risk indicators. Depression symptoms showed the strongest positive correlation with suicide risk (r = .42, p < .01), followed by anxiety (r = .38, p < .01) and perceived stress (r = .35, p < .01). Parental support demonstrated a significant negative correlation with suicide risk (r = −.34, p < .01).
Table 1. Correlations between independent variables and suicide risk (N = 1,703)

Note. Correlation is significant at the 0.01 level (2-tailed).
Figure 2 shows a heatmap of these correlations, illustrating the strength and direction of relationships among the variables.

Figure 2. Heatmap of correlations between independent variables and suicide risk.
Gender differences in risk factors
Gender differences were pronounced in psychological factors, with female participants consistently reporting significantly higher levels of depression symptoms (t = 4.89, p < .001), anxiety (t = 6.32, p < .001) and perceived stress (t = 4.15, p < .001) compared to male participants, suggesting a greater psychological burden among females. For socio-ecological factors, female participants also reported significantly higher social media addiction (t = 4.78, p < .001), potentially indicating greater exposure to online stressors, while male participants reported slightly higher parental support (t = −2.45, p = .014), which may suggest a protective factor. These findings highlight the nuanced interplay of individual and environmental influences on suicide risk across genders. Table 2. summarizes the differences between females and males.
Table 2. Gender differences in key risk factors (N = 1,703)

Note. *p < .05, **p < .01._.
Figure 3 visualizes the mean scores of key risk factors by gender.

Figure 3. Mean scores of key risk factors by gender.
Predictive model performance
A random forest classification model was developed to identify the most important predictors of suicide risk. The model demonstrated good predictive performance. Due to the superior predictive performance and ability to handle complex interactions, random forest results are presented in the main text, while the complete logistic regression outputs are available in the Supplementary Appendix for reference (see Table 3).
Table 3. Random forest model performance metrics

Feature importance analysis
The relative importance of predictors in the random forest model revealed that psychological factors were the strongest predictors of suicide risk. Figure 4 displays the feature importance scores (see Table 4).

Figure 4. Feature importance scores from the random forest model.
Table 4. Feature importance in predicting suicide risk

Note. Importance scores are normalized and sum to 1.
Receiver operating characteristic (ROC) curve
The ROC curve illustrates the model’s ability to discriminate between those with and without suicide risk. The area under the ROC curve (AUC) was 0.81 (95% CI [0.78, 0.84]), indicating good discrimination. Figure 5 presents the ROC curve.

Figure 5. ROC curve for the suicide risk prediction model.
Discussion
The results of this ML analysis provide crucial insights into suicide risk factors among Ghanaian adolescents, offering several important implications for intervention and policy development.
Summary of findings
The findings indicate that the random forest model effectively identified key predictors and demonstrated good performance in classifying individuals at risk. Psychological factors such as depression symptoms, anxiety symptoms and perceived stress are strong predictors of suicide risk among Ghanaian adolescents. Parental support serves as a protective factor, with higher levels of support associated with lower suicide risk. Female adolescents reported higher levels of psychological distress and suicide risk indicators compared to male participants.
Predictive model performance
The ROC curve demonstrates robust predictive capability, indicating that the model performs well in distinguishing between adolescents at high and low risk of suicide. This finding suggests that the model has practical utility and could be effectively deployed in Ghanaian school settings as part of a broader mental health strategy. In schools with limited access to trained mental health professionals, such a predictive tool could serve as a first-line screening mechanism, enabling educators and school counselors to identify at-risk adolescents more efficiently and allocate resources where they are most needed.
This is especially critical in the Ghanaian context, where mental health resources are scarce and stigma often prevents adolescents from seeking help (Azasu, Reference Azasu2024). A data-driven approach to early risk detection could overcome these barriers by providing an objective, non-invasive method for identifying adolescents in need of support. Furthermore, the scalability of ML-based tools makes them particularly suited for resource-constrained environments, where traditional one-on-one assessments may not be feasible due to time and personnel limitations (Atmakuru et al., Reference Atmakuru, Shahini, Chakraborty, Seoni, Salvi, Hafeez-Baig, Rashid, Tan, Barua, Molinari and Acharya2025).
In comparing model performance, random forest outperformed logistic regression in predictive accuracy, highlighting its strength in capturing complex relationships among suicide risk factors. However, logistic regression provided interpretable odds ratios, revealing key predictors like depression symptoms and the protective effect of parental support (OR = 0.88, p = .032). Together, these models offer complementary insights into risk assessment (see Supplementary Appendix A for details).
By integrating such predictive models into school-based mental health programs, there is significant potential for early intervention, reducing the likelihood of suicide attempts and improving overall mental health outcomes. However, further research is needed to ensure the model’s cultural relevance, ethical implementation and long-term efficacy in such settings.
Psychological and socio-ecological factors
The feature importance scores reveal that psychological factors, particularly depression, anxiety and perceived stress, are the strongest predictors of suicide risk among Ghanaian adolescents. This aligns with previous findings on suicide risk factors among adolescents in Ghana but provides more precise quantification of their relative importance (Oppong Asante et al., Reference Oppong Asante, Kugbey, Osafo, Quarshie and Sarfo2017; Azasu et al., Reference Azasu, Quarshie, Messias, Larnyoh, Ali and Joe2024). The significant weight of these psychological factors suggests that mental health screening programs in Ghanaian schools should prioritize depression and anxiety assessment.
The analysis reveals the substantial impact of socio-ecological factors like parental support and social media addiction, reflecting the socio-ecological framework outlined in the theoretical background. This finding is particularly relevant in the Ghanaian context, where traditional family structures are evolving due to urbanization (Yankson and Bertrand, Reference Yankson and Bertrand2012). Social media use is also rapidly increasing among adolescents in Ghana, while access to mental health resources remains scarce to address its potential adverse effects. Studies have shown the adverse effects of social media use on mental health and well-being among Ghanaian youth (Offei Ofosu, Reference Offei Ofosu2024).
Gender differences and cultural implications
The gender-based analysis reveals notable differences in risk factors between male and female adolescents. This finding is crucial given Ghana’s cultural context, where gender roles and expectations can significantly influence mental health outcomes and the literature supports significant gender differences in suicide risk across sub-Saharan Africa (Joe et al., Reference Joe, Stein, Seedat, Herman and Williams2008; Keugoung et al., Reference Keugoung, Tabah and Criel2013). While girls tend to experience suicidal thoughts more frequently than boys, their engagement in suicidal behaviors is comparable to that of boys (Azasu et al., Reference Azasu, Quarshie, Messias, Larnyoh, Ali and Joe2024). This raises critical questions about the impact of gender norms that place undue pressure on adolescent girls, heightening stress, exposure to abuse, gender-based violence and perpetuating a culture of silence. There is therefore the need for gender-sensitive intervention strategies, cultural competency in mental health services and targeted support systems that account for gender-specific risk factors.
Practical implications for Ghana’s educational and healthcare systems
The findings of this study offer valuable insights with significant practical implications for Ghana’s educational and healthcare systems. First, they highlight the need for strategic resource allocation in schools. By identifying key risk factors for adolescent suicide, stakeholders can prioritize limited mental health resources to address the most pressing needs. Schools can focus on providing targeted support for adolescents who display psychological distress, such as depression and anxiety, ensuring that interventions are directed where they will have the greatest impact.
Second, the predictive model developed in this study presents an opportunity to implement cost-effective screening programs in Ghanaian schools. Given the scarcity of mental health professionals and resources, particularly in rural and underserved areas, this model can serve as a scalable tool for early identification of at-risk adolescents. By integrating this screening tool into existing school systems, educators and counselors can proactively address mental health concerns before they escalate.
Finally, the findings underscore the importance of designing interventions that adopt a multi-level approach. Effective programs should address individual psychological factors, such as depression and anxiety, while also strengthening family support systems and fostering school-based mechanisms for mental health care. Additionally, raising community awareness and promoting engagement around adolescent mental health can help reduce stigma and create a supportive environment for young people. Together, these efforts can contribute to a more comprehensive and sustainable approach to improving mental health outcomes in Ghanaian schools.
Limitations
While this study provides valuable insights into adolescent suicide risk and the potential of predictive models in Ghanaian school settings, several limitations must be acknowledged. First, the cross-sectional design of the study limits the ability to establish causal relationships between identified risk factors and suicide risk. Longitudinal studies would be necessary to better understand the temporal dynamics of these relationships and to assess the long-term predictive accuracy of the model.
Second, the data were self-reported, which introduces the possibility of response bias. Adolescents may have underreported or overreported their psychological distress or experiences due to stigma, social desirability or misunderstanding of survey items. This could affect the reliability of the data and, consequently, the performance of the predictive model.
Third, while the sample was nationally representative, certain contextual factors unique to specific regions or subgroups may not have been fully captured. For instance, cultural differences, access to resources and variations in gender norms across rural, peri-urban and urban areas might influence risk factors differently.
Excluding absent students, those with language barriers or those with cognitive limitations may introduce selection bias and limit the generalizability of our findings to diverse and vulnerable populations.
Lastly, the predictive model, while demonstrating strong performance metrics, requires further validation in real-world settings. Implementation in schools may face challenges such as limited infrastructure, lack of trained personnel and ethical concerns regarding data privacy and stigmatization of at-risk adolescents. Future research should address these limitations by incorporating longitudinal designs, refining data collection methods and piloting the model in diverse school environments to ensure its feasibility and effectiveness.
Conclusion
This study highlights the critical need for proactive measures to address adolescent suicide risk in Ghanaian schools. By identifying key risk factors and demonstrating the potential of a predictive model for early detection, it provides a foundation for scalable, cost-effective mental health interventions in resource-limited settings.
Open peer review
To view the open peer review materials for this article, please visit http://doi.org/10.1017/gmh.2025.10083.
Supplementary material
The supplementary material for this article can be found at http://doi.org/10.1017/gmh.2025.10083.
Data availability statement
The data for this study cannot be shared as part of the approval policy by the University at Buffalo Human Research Ethics Committee.
Financial support
This research was funded by the State University of New York at Buffalo.
Competing interests
The authors have no financial interests or potential conflicts of interest to disclose as far as this article is concerned. This research did not receive any specific grant from funding agencies in the public, commercial or not-for-profit sectors. The sponsors were not involved in the design or completion of the study or manuscript.
Ethics approval
The questionnaire and methodology for this study were approved by the University at Buffalo Human Research Ethics Committee.
Consent to participate
Informed consent was obtained from all individual participants included in the study, including legal guardians.
Consent to publish
No identifying information was published in this article as this was just a cross-sectional study.









Comments
Dear Dr. Galea and Guest Editors,
I am pleased to submit my manuscript titled ‘A Machine Learning Analysis of Socio-Ecological and Psychological Risk Factors for Suicide Among a Nationally Representative Sample of Ghanaian Junior High School Students’ for consideration in the special issue Self-harm and Suicide: A Global Priority of the Cambridge Journal. My work aligns closely with the theme “Changing the Narrative” for World Suicide Prevention Day 2024 and contributes to the growing body of research aimed at addressing the global burden of suicide, particularly in low- and middle-income countries (LMICs).
The manuscript addresses key areas of focus outlined in your call for papers, including “the development of culturally appropriate suicide screening tools,” “interventions for adolescents at elevated risk,” or “the role of stigma reduction in suicide prevention efforts”. Drawing on data and insights from a nationally representative study of adolescents in Ghana, this work provides evidence-based recommendations for scalable and cost-effective detection and prediction of suicide risk tailored to resource-limited settings.
In line with the goals of the United Nations Sustainable Development Goal (UN SDG) 3.4.2 to reduce suicide mortality by one-third by 2030, this research offers innovative approaches to early identification of at-risk populations and highlights practical strategies for implementation in LMICs. It also underscores the importance of addressing the intersectionality of social, cultural, and psychological determinants of suicide, as well as the role of community engagement in reducing stigma and improving mental health outcomes.
I believe that this manuscript will make a valuable contribution to the special issue, offering both theoretical and practical insights to inform policy and practice. I have adhered to the journal’s submission guidelines and confirm that this manuscript has not been published elsewhere and is not under consideration by any other journal.
Thank you for considering my submission. I look forward to the possibility of contributing to this important special issue and am happy to provide any additional information or clarification if needed.
Sincerely,
Enoch Azasu