Analysis code for a seven-country study of extreme weather events and sexual behaviours associated with HIV seroconversion in sub-Saharan Africa (PHIA surveys + ERA5-Land)
# extreme-weather-and-sexual-behaviours-ssa
Analysis code for a seven-country study of extreme weather events and sexual behaviours associated with HIV seroconversion in sub-Saharan Africa (PHIA surveys + ERA5-Land)
# Extreme weather events and sexual behaviours in sub-Saharan Africa: path analysis
Analysis code for a seven-country study of associations between extreme weather
events and sexual behaviours linked to HIV seroconversion risk.
---
## What this repository contains
The complete analysis, from raw weather data manipulation, through PHIA data cleaning,
running the models, to the tables and figures in the manuscript. There are seven numbered stages,
which should be run in order.
```
00_setup/ paths and constants - the only files to edit
01_climate_prep/ preparing ERA5-Land to analysis-ready daily rasters
02_ewe_indices/ calculating heatwave, extreme rainfall and four drought indices
03_link_to_phia/ attaching exposures to survey participants
04_survey_prep/ merging the seven surveys and preparing data for imputation
05_imputation/ multiple imputation by chained equations
06_derivations/ main data cleaning: constructing outcomes, intermediate variables and covariates
07_analysis/ regression and path models in Stata
```
## What it does not contain
**No data.** Neither source can be redistributed:
- **PHIA surveys.** Available on application from
. Seven surveys are used: SHIMS3
(Eswatini), LePHIA (Lesotho), MPHIA (Malawi), INSIDA (Mozambique), THIS
(Tanzania), UPHIA (Uganda) and ZIMPHIA (Zimbabwe).
- **ERA5-Land.** Available from the Copernicus Climate Data Store,
. Daily precipitation, maximum and minimum
temperature, potential evaporation, volumetric soil water and total runoff,
1991 to 2022.
The pipeline therefore cannot be run end to end from this repository.
## Running it
Obtain both data sources, then create the two configuration files from their
templates and fill in the paths. No other file contains a path. …