A comprehensive R script for processing and aggregating Demographic and Health Surveys (DHS) data from Mozambique's 2022 survey to cluster-level indicators suitable for spatial analysis and modeling.
# Mozambique DHS 2022 Data Processing Pipeline
A comprehensive R script for processing and aggregating Demographic and Health Surveys (DHS) data from Mozambique's 2022 survey to cluster-level indicators suitable for spatial analysis and modeling.
## Overview
This script transforms individual and household-level DHS survey data into cluster-level aggregated indicators, enabling spatial analysis of health and demographic outcomes across Mozambique. The pipeline handles complex survey structures, applies proper weighting, and produces analysis-ready datasets with geographic coordinates.
## Features
- **Multi-Module Integration**: Merges data from 13+ DHS modules (household, women, men, children, geographic)
- **Standardized Indicators**: Calculates internationally comparable health and demographic indicators following DHS methodology
- **Survey Weights**: Properly applies household and individual sampling weights for representative estimates
- **Spatial Integration**: Includes cluster coordinates for GIS analysis and mapping
- **Reproducible Pipeline**: Clear documentation and modular structure for transparency and replication
## Calculated Indicators
### Maternal and Reproductive Health
- Women married by age 15 and 18 (ages 20-24)
- Age at first birth (women 20-24, 25-29)
- Skilled delivery assistance
- Facility-based deliveries
### Child Health and Nutrition
- Child stunting prevalence (height-for-age z-score < -2 SD)
- Birth registration (children under 5)
### Literacy
- Women's literacy rates (ages 15-49)
- Men's literacy rates (ages 15-49)
### Gender-Based Violence
- Physical, sexual, and emotional violence by intimate partners (past 12 months)
- Composite indicator for any violence
### Family Planning
- Current use of any contraceptive method
## Requirements
### R Packages
```r
tidyverse # Data manipulation and visualization
haven # DHS labeled variables
labelled # Variable labeling
expss # Tables with labeled data
openx …