Learn R Programming

SUMMER

SAE Unit/area Models and Methods for Estimation in R

Overview

SUMMER is an R package providing an extensive collection of space-time smoothing and small area estimation methods for prevalence estimation using complex survey data, with a special focus on Demographic Health Surveys (DHS) data, and the estimation of child mortality using full birth history data. The package also provides a collection of plotting functions to visualize the estimates in space and time.

Where do I start?

Roadmap of SUMMER workflow

The diagram below illustrates three commonly used workflows of the SUMMER package. Rounded blocks represent data types and rectangular blocks represent functions in the SUMMER package. Output estimates are highlighted in the boxes with red borders.

  • The dotted yellow arrows represent the workflow using smoothSurvey() to estimate the prevalence of a generic binary indicator.
  • The black solid arrows represent the workflow using smoothDirect() to perform area-level smoothing of mortality rates.
  • The blue solid arrows represent the workflow using smoothCluster() to perform cluster-level smoothing of mortality rates.

Citation

To cite the SUMMER package in publications use

  @Manual{li2020space,
    title = {Space-Time Smoothing of Demographic and Health Indicators using the R Package SUMMER},
    author = {Zehang R Li and Bryan D Martin and Tracy Q Dong and Geir-Arne Fuglstad and Jessica Godwin and John Paige and Andrea Riebler and Samuel Clark and Jon Wakefield},
    year = {2020},
    journal = {arXiv preprint}
  }

To cite specific version of the SUMMER package use

  • v2.0.0
  @Manual{summer2025,
    title = {SUMMER: Spatio-Temporal Under-Five Mortality Methods for Estimation},
    author = {Zehang R Li and Bryan D Martin and Yuan Hsiao and Jessica Godwin and John Paige and Peter Gao and Jon Wakefield and Samuel J Clark and Geir-Arne Fuglstad and Andrea Riebler},
    year = {2025},
    note = {R package version 2.0.0},
  }
  • v1.0.0
  @Manual{summer2020,
    title = {SUMMER: Spatio-Temporal Under-Five Mortality Methods for Estimation},
    author = {Zehang R Li and Bryan D Martin and Yuan Hsiao and Jessica Godwin and Jon Wakefield and Samuel J Clark and Geir-Arne Fuglstad and Andrea Riebler},
    year = {2020},
    note = {R package version 1.0.0},
  }
  • earlier versions (e.g., v0.3.0)
  @Manual{summer2019,
    title = {SUMMER: Spatio-Temporal Under-Five Mortality Methods for Estimation},
    author = {Bryan D Martin and Zehang R Li and Yuan Hsiao and Jessica Godwin and Jon Wakefield and Samuel J Clark and Geir-Arne Fuglstad and Andrea Riebler},
    year = {2019},
    note = {R package version 0.3.0},
  }

Installation - CRAN

The package is now available on CRAN. The easiest way to download is to install directly using the code below.

install.packages("SUMMER")

Installation - Development Version

To download the development version of the SUMMER package, use the code below.

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

Examples of most of the main functions are described in the several vignettes listed on https://cran.r-project.org/package=SUMMER.

Bug Reports / Change Requests

If you encounter a bug or would like make a change request, please file it as an issue here.

Copy Link

Version

Install

install.packages('SUMMER')

Monthly Downloads

1,484

Version

2.0.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Zehang Li

Last Published

January 7th, 2025

Functions in SUMMER (2.0.0)

aggregateSurvey

Aggregate estimators from different surveys.
getBirths

Reformat full birth records into person-month format
fitINLA2

Cluster-level space-time smoothing models for mortality rates
getAreaName

Determines which administrative areas contain the given points
getAmat

Extract adjacency matrix from the map
getAdjusted

Adjust direct estimates and their associated variances
getCounts

Aggregate person-month data into counts and totals by groups.
getDirect

Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for a single survey.
getDiag

Extract posterior summaries of random effects
getSmoothed

Extract smoothed estimates.
getDirectList

Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for multiple surveys.
iid.new

New random IID models for m-year to period random effects
hatchPlot

Plot maps with uncertainty hatching.
logit

Logit transformation
logitNormMean

Calculate the mean of a distribution whose logit is Gaussian
mapPoints

Map GPS points to polygon regions
mapPlot

Plot region-level variables on a map
mapEstimates

Mapping estimates for svysae object
makePopIntegrationTab

Generating pixellated populations, and population frames
iid.new.pc

New random IID models for m-year to period random effects
kenyaPopulationData

Kenya 2009 Census Frame and Related Datasets
rw.new.pc

New random walk 1 and 2 models for m-year to period random effects
poppRegionFromPopMat

Generate a population frame of a similar format to poppa argument of simPopCustom with a custom set of regions
rw.new

New random walk 1 and 2 models for m-year to period random effects
plot.SUMMERproj

Plot projection output.
ridgePlot

Calculate and plot posterior densities of the projected estimates
projKenya

Map projection for Kenya
rst

Simulate spatial and temporal random effects
print.SUMMERprojlist

Print method for the combined projection output.
print.SUMMERmodel.svy

Print method for the smoothing models from smoothSurvey.
print.SUMMERmodel

Print method for the smoothing models.
simSPDE

Simulate from the SPDE spatial model
simPop

Simulate populations and areal prevalences
simPopInternal

Internal functions for population simulation
smoothUnit

Smooth via basic unit level model
setThresholdsByRegion

[Experimental]
smoothArea

Small area estimation via basic area level model
simhyper

Simulate hyperpriors from an GMRF
smoothCluster

Cluster-level space-time smoothing models for mortality rates
smoothSurvey

Fit space-time smoothing models for a binary outcome from complex surveys.
smoothDirect

Smoothed direct estimates for mortality rates
summary.SUMMERmodel.svy

Summary method for the smoothing model and output from smoothSurvey.
summary.SUMMERprojlist

Summary method for the combined projection output. This function is the print method for class SUMMERprojlist.
tcpPlot

Discrete-color maps based on the True Classification Probabilities
st.new.pc

New Type I to IV space time interaction models for m-year to period random effects
st.new

New Type I to IV space time interaction models for m-year to period random effects
summary.SUMMERmodel

Summary method for the smoothing models.
DemoData2

Simulated dataset for prevalence mapping.
Benchmark

Benchmark posterior draws to national estimates
compareEstimates

Plot heatmap comparing pairwise posterior exceedence probabilities for svysae object
expit

Expit transformation
calibrateByRegion

Calibrate the point level totals so their sum matches the regional totals
aggPixelPreds

Helper function of pixelPopToArea
changeRegion

Map region names to a common set.
aggPop

Aggregate populations to the specified areal level
DemoData

Simulated child mortality person-month dataset.
KenData

Auxiliary data for Kenya 2014 DHS.
BRFSS

The BRFSS dataset
MalawiData

Auxiliary data for Malawi 2000, 2004, 2010, and 2015 DHS.
KingCounty

Map of King County
DemoMap2

Kenya Admin-1 region map for illustration purpose
MalawiMap

Malawi Admin-2 map
fitGeneric

Fit space-time smoothing models for a binary outcome from complex surveys.
fitINLA

Smoothed direct estimates for mortality rates
DemoMap

Uganda Admin-1 region map for illustration purpose
SUMMER-package

SUMMER: Small-Area-Estimation Unit/Area Models and Methods for Estimation in R