sae4health

CRAN_Status_Badge

Small Area Estimation for Key Health and Demographic Indicators from Household Surveys

Overview

The ‘sae4health’ package enables small area estimation (SAE) of health and demographic indicators in low- and middle-income countries (LMICs). It powers an R Shiny app that helps public health analysts, policymakers, and researchers generate subnational estimates and prevalence maps for 150+ binary indicators from Demographic and Health Surveys (DHS). Basing its core SAE analysis workflow on the ‘surveyPrev’ package, the app ensures methodological rigor through guided model selection, automated fitting, and interactive visualization. For more details, visit our official website for detailed documentation.

This software is for research purpose only and is licensed under the terms specified in the LICENSE file.

The Github repo maintains the source code for this R Shiny application and it is structured as an R package. There are two primary venues to utilize this application:

  1. Web-Based Version:
  1. Local R Package Installation:

Web-based R Shiny app

The R Shiny app is readily accessible via https://rsc.stat.washington.edu/surveyPrevRShiny/. The only requirement is a stable internet connection. This web-based deployment supports full functionality and serves as the primary distribution channel.

One advantage of the online version is that it includes preloaded shapefiles, reducing the need for manual uploads. While all versions require users to upload their own DHS survey datasets for analysis, currently the online version internally hosts the 2018 Nigeria DHS, 2022 Kenya DHS, and 2023 Senegal DHS (without the need for data upload!), with more datasets planned for future inclusion.

Installation of the R Shiny app as a R package

Some non-CRAN dependencies can be installed using the following command. We strongly recommend installing the most recent version of SUMMER and surveyPrev package from Github.

# install.packages("devtools")
devtools::install_github("richardli/SUMMER")
devtools::install_github("richardli/surveyPrev")

install.packages("INLA",repos=c(getOption("repos"),
                        INLA="https://inla.r-inla-download.org/R/testing"),dep=TRUE)

You can then install the development version of sae4health with:

devtools::install_github("wu-thomas/sae4health")

Processing the analysis dataset for indicators, using specific coding schemes and handling labels, requires the following libraries to be preloaded before running the app:

library(labelled)
library(naniar)
library(sjlabelled)
library(dplyr)
library(data.table)
library(haven)

You can launch the R Shiny app with the following command, and we recommend opening a new browser tab from within the launched R Shiny app for better accessing web links.


library(sae4health)
sae4health::run_app()

If the colors in the interactive Leaflet maps appear inverted relative to the legend (e.g., regions with high values in the legend are shown in low-value colors), you can run the app with the following option. This issue arises due to differences in R and Leaflet package versions and is beyond our control.


sae4health::run_app(legend_color_reverse=T)

For WHO workshop attendees only:
If you have received the WHO shapefile distributed by WHO officials for this technical workshop and are using the WHO version of the app, please run the following version:


sae4health::run_app(version='DHS-WHO')