Skip to contents

This function processes Water, Sanitation, and Hygiene (WASH) coverage data for African countries, optimizes the weights of WASH variables, calculates weighted means, examines their correlation with cholera incidence, and imputes missing WASH values using a similarity matrix. The function generates plots and tables showing these relationships and saves the results to specified paths.

Usage

est_WASH_coverage(PATHS)

Arguments

PATHS

A list containing paths where the WASH data, figures, and model inputs should be saved. Typically generated by the get_paths() function and should include:

  • DATA_WASH: Path to the WASH data CSV file.

  • DOCS_FIGURES: Path to save output figures.

  • MODEL_INPUT: Path to save model input data.

  • DOCS_TABLES: Path to save tables used in documentation.

  • DATA_SIMILARITY_MATRIX: Path to the similarity matrix CSV file for imputation.

Value

The function does not return a value, but generates and saves plots and CSV files showing WASH coverage estimates, optimized weights for WASH variables, their correlation with cholera incidence, and imputed values for missing data.

Details

The WASH coverage data is first normalized (on a 0-1 scale). Risk-related WASH variables (such as unimproved water sources, surface water, unimproved sanitation, and open defecation) are converted to protective factors by taking the complement (1 - value). Then, the function:

  • Optimizes the weights for each WASH variable to maximize correlation with cholera incidence using the L-BFGS-B method.

  • Calculates the weighted mean of WASH variables for each country.

  • Imputes missing WASH data based on a country similarity matrix. Missing WASH values are estimated using the weighted average of the top 3 most similar countries.

  • Generates multiple plots showing relationships between WASH variables and cholera incidence.

  • Saves tables of optimized weights, weighted mean WASH indices, and imputed WASH values.

Data Source: Sikder et al. (2023). Water, Sanitation, and Hygiene Coverage and Cholera Incidence in Sub-Saharan Africa. doi:10.1021/acs.est.3c01317 .

Examples

if (FALSE) { # \dontrun{
# Define paths for saving WASH data, figures, and tables
PATHS <- get_paths()

# Estimate WASH coverage and correlation with cholera incidence
est_WASH_coverage(PATHS)
} # }