Logo Lanfrica

bkappiah007/life-expectancy-africa

Domain:

healthcare

Record type:

software
Creator:
bka
Host:
# Comparative Statistical and Machine Learning Approaches for Predicting Life Expectancy in African Countries This repository contains the full R implementation of the analysis presented in *"Comparative Statistical and Machine Learning Approaches for Predicting Life Expectancy in African Countries"* (Appiah, Incoom-Koomson, Bonney, and Boye). The study compares seven statistical and machine learning models — Multiple Linear Regression (MLR), Stepwise Regression, Ridge, LASSO, Elastic Net, Random Forest, and Gradient Boosting Machine (GBM) — for predicting life expectancy across 54 African countries using the WHO Life Expectancy dataset (2000–2015). ## Repository Contents - `life_expectancy_analysis.R` — Full analysis script (~900 lines) - `Life_expectancy.Rproj` — RStudio project file ## Data The analysis uses the **WHO Life Expectancy (2000–2015)** dataset, originally available on Kaggle. The raw file (`Life Expectancy Data.csv`, despite its `.xls`-style name in some Kaggle versions) is **not included** in this repository due to size/licensing — download it from Kaggle and place it in the project directory before running the script. ## How to Run 1. Clone or download this repository. 2. Open `Life_expectancy.Rproj` in RStudio (recommended) so working directories and paths resolve correctly. 3. Download the WHO Life Expectancy dataset from Kaggle and save it in the project folder. 4. Open `life_expectancy_analysis.R`. 5. **Note on data loading (Section 1):** the script uses `file.choose()` for an interactive file picker by default. When prompted, select the downloaded dataset file. Alternatively, comment out the `file.choose()` line and hardcode the file path using the provided `raw_path Appiah, B. K., Incoom-Koomson, K., Bonney, S., & Boye, M. *Comparative Statistical and > Machine Learning Approaches for Predicting Life Expectancy in African Countries*. ## Contact Bernard Kwabena Appiah — bkappiah007@gmail.com Department of Mathematics and Statistics, …