v1.0.0 — Initial Release
First public release of the analysis pipeline for Digital access, media exposure, and maternal health service utilization among women in Ghana: An analysis of the 2022 Ghana Demographic and Health Survey.
This release contains the complete, end-to-end analysis code used to generate the manuscript's tables, figures, and supplementary material from the raw 2022 GDHS Individual Recode file.
Highlights
Full reproducible pipeline (Steps 0–10) from raw .SAV data to manuscript-ready Word tables and figures.
Survey-weighted descriptive analysis — prevalence with 95% CI and Rao–Scott adjusted F tests, accounting for DHS clustering and stratification (R survey package via rpy2).
Multilevel logistic regression (lme4::glmer, random intercept for PSU) for four outcomes — ANC use (4+), adequate ANC (8+), skilled birth attendance, and postnatal care — each with an exposure-only (Model I) and fully adjusted (Model II) specification.
Multicollinearity diagnostic with an automated parity-coding decision rule (5-category vs. merged 4-category) based on VIF thresholds.
Multiple imputation sensitivity analysis (MICE, miceforest, m = 30 datasets, 5 iterations) with Rubin's Rules pooling, compared against the complete-case results.
Automated output generation:
Manuscript Tables 1–6 (background characteristics, prevalence, media exposure and digital access regression results)
Figures: bar chart, exposure/outcome heatmap, regional choropleth map, forest plot of adjusted odds ratios
Full supplementary information package (S1–S8): missingness, unadjusted and adjusted models, VIF, ICC/MOR null models, and MICE comparison
Requirements
Python 3 (Colab environment) with pandas, numpy, scipy, statsmodels, pyreadstat, miceforest, python-docx, geopandas, rpy2, matplotlib
R 4.x with survey, lme4, jsonlite
2022 GDHS Individual Recode file (GHIR8CFL.SAV), obtained separately from the DHS Program (not included in this repository)
See README.md for full setup and usage instructions.
Known Limitations
Requires manual placement of the GDHS .SAV file, which is not distributed with this repository due to DHS Program data-sharing terms.
The regional choropleth map requires a live internet connection to fetch Ghana admin-1 boundaries from GADM at runtime.
Notebook cells are stateful and intended to be run sequentially on a fresh runtime; running out of order may produce errors due to the pickled intermediate cache (gdhs_full_results.pkl).
Citation
If you use this code, please cite the associated manuscript and the underlying data source (Ghana Statistical Service, Ghana Health Service, and ICF. 2024. Ghana Demographic and Health Survey 2022.).
Full changelog: Initial release — no prior versions.