Small Area Estimation for Key Health and Demographic Indicators from Household Surveys
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:
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.
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")
::install_github("richardli/SUMMER")
devtools::install_github("richardli/surveyPrev")
devtools
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:
::install_github("wu-thomas/sae4health") devtools
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)
::run_app() sae4health
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.
::run_app(legend_color_reverse=T) sae4health
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:
::run_app(version='DHS-WHO') sae4health