All-Cause and Excess Mortality Calculator

An interactive 'shiny' application that estimates all-cause mortality and excess mortality from country-level weekly or monthly death counts. Users supply observed deaths and an event calendar (for example COVID-19 waves or typhoons); the app fits one or more statistical baseline models (historical average, negative binomial regression, quasi-Poisson regression, zero-inflated Poisson regression, ARIMA (autoregressive integrated moving average) and SARIMA (seasonal ARIMA) models, GAM (generalized additive model) splines, and the model of Karlinsky and Kobak (2021) ) using periods outside the supplied events, estimates expected deaths across the observed series, and reports excess deaths, P-scores (excess deaths as a percentage of expected deaths) and confidence limits with tables, plots and downloadable reports. Launch the application with run_app().


exmort exmort hex logo showing observed deaths above an expected baseline

CRAN status CRAN downloads

All-Cause and Excess Mortality Calculator — an R Shiny application for estimating all-cause mortality and excess mortality from country-level weekly or monthly death counts, developed at the WHO Regional Office for the Western Pacific (WPRO).

You supply observed deaths and an event calendar (e.g. COVID-19 waves, typhoons). The app fits one or more statistical baseline models using periods outside the supplied events, estimates expected deaths across the observed series, and reports excess deaths, P-scores and confidence limits with tables, plots and downloadable reports.

Baseline models included:

  • Historical average
  • Negative binomial regression
  • Quasi-Poisson regression
  • Zero-inflated Poisson
  • ARIMA / SARIMA
  • Generalized additive model (GAM spline)
  • Karlinsky–Kobak model

Documentation: https://shanlong-who.github.io/exmort/

Guides

Guide What you will learn
Getting started Install the package, run a built-in example and export a report
Preparing data Fill the weekly or monthly workbook and define the event calendar
Models and interpretation Compare baselines, read uncertainty and explain excess deaths and P-scores

The website contains documentation. Launch the Shiny calculator from R to perform an analysis.

Installation

Install from CRAN:

install.packages("exmort")

Development version from GitHub:

# install.packages("remotes")
remotes::install_github("shanlong-who/exmort")

Usage

library(exmort)
run_app()

The app opens in your default web browser and runs entirely on your machine — no data leaves your computer. Built-in example datasets for several countries are included; you can also upload your own workbook using the templates on the Data tab.

Start with Data → Upload Data → Built-in example data, select a country and its mortality and event sheets, then click Merge Built-in Data. Review View Data, open Model, choose a group and click Run Model. Inspect Tables and Plots before generating an HTML report.

The current models use periods outside the supplied events (event_index == "0") as their baseline. These may include observations after an event; review the input time range and event calendar carefully.

Use RStudio's Stop button or Escape in the console to stop the app.

Optional features

  • Word (.docx) reports need the officedown package: install.packages("officedown").
  • PDF reports need a LaTeX installation, e.g. tinytex::install_tinytex().

License

GPL-3. © World Health Organization Regional Office for the Western Pacific.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("exmort")

0.1.1 by Shanlong Ding, 15 days ago


https://github.com/shanlong-who/exmort, https://shanlong-who.github.io/exmort/


Report a bug at https://github.com/shanlong-who/exmort/issues


Browse source code at https://github.com/cran/exmort


Authors: Shanlong Ding [aut, cre] , World Health Organization Regional Office for the Western Pacific [cph, fnd]


Documentation:   PDF Manual  


GPL-3 license


Imports base64enc, data.table, dplyr, DT, forecast, ggplot2, ggrepel, htmltools, ISOweek, kableExtra, knitr, lubridate, mgcv, openxlsx, parallel, plotly, reactable, readxl, RColorBrewer, reshape2, rmarkdown, scales, shiny, shinyalert, shinycssloaders, shinyjs, stringr, tibble, tidyr, zoo

Suggests DSIR, officedown, testthat, tinytex

System requirements: pandoc (>= 1.14) for report rendering; a LaTeX installation (for example TinyTeX) is required only for PDF reports.


See at CRAN