exmort — All-Cause and Excess Mortality Calculator
R packageexmort packages the WHO Western Pacific excess mortality methodology as an installable R package, so countries can run the analysis on their own machines instead of through a hosted service. It ships an interactive Shiny application that estimates all-cause mortality and excess deaths from country-level weekly or monthly death counts.
The package is published on CRAN under the GPL-3 licence. The WHO Regional Office for the Western Pacific is the copyright holder and funder.
What it does
Given a series of reported death counts, the app fits several statistical baseline models over a user-defined baseline period and projects the number of deaths that would have been expected in the absence of the event under study. It then reports:
- Excess deaths — the difference between reported and expected counts
- P-scores — excess deaths as a percentage of expected deaths
- Confidence limits around the baseline projection
Results are presented as interactive visualizations, and the app generates downloadable reports.
Because the package runs locally, mortality data never has to leave the analyst's computer — the same principle behind the Region's earlier hosted calculator, but without the upload step.
Installation
install.packages("exmort")
Then launch the application from an R session:
library(exmort)
run_app()
The app ships with built-in example datasets and also accepts custom data uploads.
Rendering reports requires Pandoc (1.14 or later); a LaTeX installation is optional and only needed for PDF output.
Related tool
A hosted version of this calculator is available on this platform as the WPRO All-Cause-of-Mortality & Excess Death Calculator, for users who prefer not to install R.