EpiNow2: Estimate and Forecast Real-Time Infection Dynamics

Estimates the time-varying reproduction number, rate of spread, and doubling time using a renewal equation approach combined with Bayesian inference via Stan. Supports Gaussian process and random walk priors for modelling changes in transmission over time. Accounts for delays between infection and observation (incubation period, reporting delays), right-truncation in recent data, day-of-week effects, and observation overdispersion. Can estimate relationships between primary and secondary outcomes (e.g., cases to hospitalisations or deaths) and forecast both. Runs across multiple regions in parallel. Based on Abbott et al. (2020) <doi:10.12688/wellcomeopenres.16006.1> and Gostic et al. (2020) <doi:10.1101/2020.06.18.20134858>.

Version: 1.8.0
Depends: R (≥ 3.5.0)
Imports: checkmate, cli, data.table (≥ 1.15.0), futile.logger (≥ 1.4), ggplot2, lifecycle, lubridate, methods, patchwork, posterior, primarycensored, purrr, R.utils (≥ 2.0.0), Rcpp (≥ 0.12.0), rlang (≥ 0.4.7), rstan (≥ 2.26.0), rstantools (≥ 2.2.0), runner, scales, stats, truncnorm, utils
LinkingTo: BH (≥ 1.66.0), Rcpp (≥ 0.12.0), RcppEigen (≥ 0.3.3.3.0), RcppParallel (≥ 5.0.1), rstan (≥ 2.26.0), StanHeaders (≥ 2.26.0)
Suggests: cmdstanr, future, future.apply, knitr, parallelly, progressr, rmarkdown, scoringutils, spelling, testthat, withr
Published: 2026-02-04
DOI: 10.32614/CRAN.package.EpiNow2
Author: Sam Abbott ORCID iD [aut], Joel Hellewell ORCID iD [aut], Katharine Sherratt [aut], Katelyn Gostic [aut], Joe Hickson [aut], Hamada S. Badr ORCID iD [aut], Michael DeWitt ORCID iD [aut], James M. Azam ORCID iD [aut], Adrian Lison ORCID iD [aut], Robin Thompson [ctb], Sophie Meakin [ctb], James Munday [ctb], Nikos Bosse [ctb], Paul Mee [ctb], Peter Ellis [ctb], Pietro Monticone [ctb], Lloyd Chapman [ctb], Andrew Johnson [ctb], Kaitlyn Johnson ORCID iD [ctb], Adam Howes ORCID iD [ctb], Sebastian Funk ORCID iD [aut, cre]
Maintainer: Sebastian Funk <sebastian.funk at lshtm.ac.uk>
BugReports: https://github.com/epiforecasts/EpiNow2/issues
License: MIT + file LICENSE
URL: https://epiforecasts.io/EpiNow2/, https://epiforecasts.io/EpiNow2/dev/, https://github.com/epiforecasts/EpiNow2
NeedsCompilation: yes
SystemRequirements: GNU make C++17
Additional_repositories: https://production.r-multiverse.org/2025-12-15
Language: en-GB
Materials: README, NEWS
In views: Epidemiology
CRAN checks: EpiNow2 results

Documentation:

Reference manual: EpiNow2.html , EpiNow2.pdf
Vignettes: Getting started with EpiNow2 (source)
Case studies and use in the literature (source, R code)
Using epinow() for running in production mode (source)
Model definition: estimate_infections() (source, R code)
Examples: estimate_infections() (source)
Workflow for Rt estimation and forecasting (source)
Model definition: estimate_secondary() (source, R code)
Model definition: estimate_truncation() (source, R code)
Forecasting multiple data streams (source)
Gaussian Process implementation details (source, R code)
Prior choice and specification guide (source)

Downloads:

Package source: EpiNow2_1.8.0.tar.gz
Windows binaries: r-devel: EpiNow2_1.8.0.zip, r-release: EpiNow2_1.7.1.zip, r-oldrel: EpiNow2_1.7.1.zip
macOS binaries: r-release (arm64): EpiNow2_1.7.1.tgz, r-oldrel (arm64): EpiNow2_1.7.1.tgz, r-release (x86_64): EpiNow2_1.8.0.tgz, r-oldrel (x86_64): EpiNow2_1.8.0.tgz
Old sources: EpiNow2 archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=EpiNow2 to link to this page.