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/
The GitHub development version also supports selecting one country and one cause of death from a monthly workbook. It includes official Australian (2015-May 2026) and Philippine (2019-2024) examples, a cause-specific template, and separate historical-average and negative-binomial baselines. The seven all-cause models and Best Fit remain available. See the cause-specific guide for use and data limitations. The Philippine example compares 2024 with pandemic-inclusive 2019-2023 history; it is not a pre-pandemic counterfactual. These additions are not yet on CRAN.
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
In the development version, select English or 简体中文 from Language / 语言 in the navigation bar. You can switch during an analysis and keep your data, choices and fitted results. Generated reports use English.
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
officedownpackage:install.packages("officedown"). -
PDF reports need a LaTeX installation, e.g.
tinytex::install_tinytex().
