This repository contains an analysis of global mental health data, focusing on depression prevalence, medication usage, and the perceived helpfulness of medication across different countries. The analysis includes data visualization and statistical summaries.
- Primary Dataset: Wellcome Global Monitor Mental Health Report 2020
- Secondary/Validation Dataset: OECD Pharmaceutical Sales Data
mental_health_analysis.R: The main R script for cleaning, analyzing, and visualizing the data.wgm_csv.csv: Primary dataset containing mental health survey data.2023valid.csv: Secondary dataset containing pharmaceutical sales data for validation purposes.README.md: This file, providing an overview of the project..gitignore: Specifies files and directories to be ignored by Git.LICENSE: License for the repository.
-
Data Cleaning:
- Renamed columns for better readability.
- Converted relevant variables into factors with descriptive labels.
- Filtered out incomplete cases and irrelevant responses.
-
Depression Prevalence Analysis:
- Created frequency tables and calculated percentages of responses (e.g., "Yes," "No").
- Visualized data with bar charts showing the distribution of responses by country.
-
Medication Usage Analysis:
- Analyzed responses to medication usage for depression.
- Calculated and visualized the percentage of respondents taking medication by country.
-
Medication Helpfulness Analysis:
- Filtered data to exclude "Don't know" responses.
- Calculated and visualized the perceived helpfulness of medication across countries.
-
Integrated Analysis:
- Merged datasets to compare depression prevalence, medication usage, and helpfulness.
- Created a consolidated bar chart for all metrics by country.
-
Validation:
- Compared and correlated self-reported medication usage with pharmaceutical sales data from OECD.
-
Estimation
- Calculated estimated depression prevalence in countries that weren't included in the dataset and were experiencing armed conflict/occupation in 2020.
-
Clustering
- Created regional clusters.
- Added depression estimations of missing countries to clusters.
The analysis includes multiple visualizations created using ggplot2, such as:
- Bar charts for depression prevalence.
- Stacked bar charts for medication helpfulness.
- Consolidated charts comparing all metrics by country.
- Install the required R libraries:
install.packages(c("tidyverse", "dplyr", "ggplot2", "pastecs"))
- Update the file paths in the script to point to the correct locations of the datasets.
- Run the script
mental_health_analysis.Rin RStudio or any R environment.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please create an issue in this repository.