I built a panel-trained model to predict year-to-year changes in suicide rates for South Africa. Structural socio-economic indicators explain long-run trends but provide limited predictive power for short-term fluctuations, which are dominated by unobserved shocks.
Please download the zip files and open in on Google Colab, or Jupyter Notebook
Predicting Year-to-Year Changes in Suicide Rates in South Africa
A Panel-Based Socioeconomic Modeling Approach
📌 Project Overview
This project develops a data-driven, statistically grounded machine learning model to predict year-to-year changes in suicide rates in South Africa, using socioeconomic signals learned from a multi-country panel dataset.
Rather than predicting absolute suicide levels, the model focuses on annual changes, which:
Reduces non-stationarity
Avoids spurious trend learning
Aligns with best practices in epidemiological and economic time-series modeling
The project emphasizes interpretability, robustness, and uncertainty awareness, making it suitable for research, policy analysis, and academic work.
🎯 Objectives
Predict annual changes in suicide rates for South Africa
Learn structural relationships from comparable countries using panel data
Avoid temporal leakage using time-aware validation
Quantify uncertainty in predictions
Produce an interpretable and defensible baseline model
🧠 Methodological Summary
Target Variable
SuicideRate_diff
Year-over-year change in suicide mortality rate (per 100,000 population)
Predictors (3-Year Rolling Averages)
Alcohol consumption per capita
Intentional homicide rate
GDP per capita (current US$)
Rolling averages are used to capture structural trends while reducing short-term noise.
📊 Data Sources
All data comes from authoritative international sources:
Suicide mortality rate – UN SDG / WHO
Alcohol consumption – WHO / UN SDG
Homicide rate – UN SDG
GDP per capita – World Bank (NY.GDP.PCAP.CD)
Countries were selected based on:
Data availability (2000–2024)
Reporting consistency
Socioeconomic comparability
South Africa is explicitly held out as the prediction target.
🧩 Modeling Approach
Model type: Ridge Regression (L2-regularized linear model)
Training strategy:
Panel learning on multiple countries
Sou …