Package: EpiEstim 3.0.0

Anne Cori

EpiEstim: Estimate Time Varying Reproduction Numbers from Epidemic Curves

Tools to quantify transmissibility throughout an epidemic from the analysis of time series of incidence as described in Cori et al. (2013) <doi:10.1093/aje/kwt133> and Wallinga and Teunis (2004) <doi:10.1093/aje/kwh255>.

Authors:Anne Cori [aut, cre], Simon Cauchemez [ctb], Neil M. Ferguson [ctb], Christophe Fraser [ctb], Elisabeth Dahlqwist [ctb], P. Alex Demarsh [ctb], Thibaut Jombart [ctb], Zhian N. Kamvar [ctb], Justin Lessler [ctb], Shikun Li [ctb], Jonathan A. Polonsky [ctb], Jake Stockwin [ctb], Robin Thompson [ctb], Rolina van Gaalen [ctb], Rebecca Nash [ctb], Sangeeta Bhatia [ctb], Jack Wardle [ctb], Andrea Brizzi [ctb]

EpiEstim_3.0.0.tar.gz
EpiEstim_3.0.0.zip(r-4.7)EpiEstim_3.0.0.zip(r-4.6)EpiEstim_3.0.0.zip(r-4.5)
EpiEstim_3.0.0.tgz(r-4.6-any)EpiEstim_3.0.0.tgz(r-4.5-any)
EpiEstim_3.0.0.tar.gz(r-4.7-any)EpiEstim_3.0.0.tar.gz(r-4.6-any)
EpiEstim_3.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
EpiEstim/json (API)

# Install 'EpiEstim' in R:
install.packages('EpiEstim', repos = c('https://mrc-ide.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mrc-ide/epiestim/issues

Datasets:
  • covid_deaths_2020_uk - Data on the 2020-2022 SARS-CoV-2 epidemic in the UK.
  • flu_2009_NYC_school - Data on the 2009 H1N1 influenza pandemic in a school in New York city
  • Flu1918 - Data on the 1918 H1N1 influenza pandemic in Baltimore.
  • Flu2009 - Data on the 2009 H1N1 influenza pandemic in a school in Pennsylvania.
  • Measles1861 - Data on the 1861 measles epidemic in Hagelloch, Germany.
  • mers_2014_15 - Data on Middle East Respiratory Syndrome (MERS) in Saudi Arabia.
  • MockRotavirus - Mock data on a rotavirus epidemic.
  • SARS2003 - Data on the 2003 SARS epidemic in Hong Kong.
  • Smallpox1972 - Data on the 1972 smallpox epidemic in Kosovo

On CRAN:

Conda:

12.81 score 104 stars 7 packages 1.3k scripts 1.2k downloads 60 mentions 31 exports 56 dependencies

Last updated from:a40bd9a972 (on main). Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR135
source / vignettesOK353
linux-release-x86_64ERROR140
macos-release-arm64ERROR79
macos-oldrel-arm64ERROR116
windows-develERROR65
windows-releaseERROR64
windows-oldrelERROR69
wasm-releaseOK175

Exports:aggregate_incbackimpute_Icheck_cdt_samples_convergencecoarse2estimcompute_lambdacompute_si_cutoffcompute_t_mindefault_mcmc_controlsdefault_priorsdiscr_siDiscrSIdraw_epsilondraw_Restimate_advantageestimate_Restimate_R_aggestimate_R_plotsEstimateRfirst_nonzero_incidget_shape_epsilonget_shape_R_flatinit_mcmc_paramsmake_configmake_mcmc_controloverall_infectivityOverallInfectivityprocess_I_multivariantsample_posterior_Rsi_from_data_valid_distrswallinga_teunisWT

Dependencies:abindaweekclicoarseDataToolscodacpp11data.tabledistcretedplyrepitrixfarverfastymdfitdistrplusgenericsggplot2gluegratesgtableincidenceincidence2isobandlabelinglatticelifecyclemagrittrMASSMatrixMatrixModelsmcmcMCMCpackpatchworkpillarpkgconfigplyrpurrrquantregR6RColorBrewerRcppreshape2rlangS7scalessodiumSparseMstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithrympes

Dealing with missed generations of infections with EpiEstim
Background | Why do we need backimputation? | A simple toy scenario | Real world scenario: UK COVID deaths | No left-censoring: early R~t~ estimates remain similar | Left-censoring: back-imputation reduces bias. | Caveats | References

Last update: 2026-03-27
Started: 2024-08-30

EpiEstim Vignette
Input data | Step A: Serial Interval | Step B: Incidence | Estimate R~t~ | Step C: estimate_R() | Prior for R~t~ | Forecast future incidence | Step D: Projections package | Example A: Entire workflow | Example B: Estimating R~t~ using non-parametric distribution | Example C: Estimating R~t~ using infector-infected cases | Example D: Estimating R~t~ using "si_from_sample" | Example E: Estimating R~t~ using "uncertain_si" | Example F: Changing the prior for estimating R~t~ | Example G: Changing the time window to estimate R~t~ | References

Last update: 2026-03-27
Started: 2021-04-09

MV-EpiEstim
SARS-CoV-2 variants

Last update: 2026-03-27
Started: 2021-11-26

EpiEstim for aggregated incidence data
Estimate R~t~ from temporally aggregated incidence data | estimate_R() for aggregated data | Estimate R~t~ from weekly COVID-19 data | References

Last update: 2026-03-25
Started: 2022-12-07

EpiEstim: a demonstration
Overview | Estimating R on sliding weekly windows, with a parametric serial interval | Estimating R with a non parametric serial interval distribution | Estimating R accounting for uncertainty on the serial interval distribution | Estimating R and the serial interval using data on pairs infector/infected | Changing the time windows for estimation | Accounting for missed generations of infections | Different ways of specifying the incidence | Specifying imported cases | EpiEstimApp

Last update: 2026-03-25
Started: 2021-04-09

Alternative software for estimating the reproduction number
Summary table of other R packages and tools

Last update: 2023-04-20
Started: 2022-04-01

Readme and manuals

Help Manual

Help pageTopics
Aggregating daily incidence to longer time windowsaggregate_inc
Impute unobserved generations of infectionbackimpute_I
Check MCMC chain convergence using the Gelman-Rubin algorithmcheck_cdt_samples_convergence
Link coarseDataTools and EpiEstimcoarse2estim
Compute the overall infectivitycompute_lambda
Index before which at most a given probability mass is capturedcompute_si_cutoff
Compute the smallest index at which joint estimation should startcompute_t_min
Data on the 2020-2022 SARS-CoV-2 epidemic in the UK.covid_deaths_2020_uk
Set default for MCMC controldefault_mcmc_controls
Set default for Gamma priorsdefault_priors
Compute discretized generation time distributiondiscr_si
Function to ensure compatibility with EpiEstim versions <2.0DiscrSI
Draw epsilon from marginal posterior distributiondraw_epsilon
Draw R from marginal posterior distributiondraw_R
Estimate instantaneous reproduction numberestimate_advantage
Estimate the instantaneous reproduction numberestimate_R
Estimate instantaneous reproduction number from coarsely aggregated dataestimate_R_agg
Wrapper for plot.estimate_Restimate_R_plots
Function to ensure compatibility with EpiEstim versions <2.0EstimateR
First day of non-zero incidencefirst_nonzero_incid
Data on the 2009 H1N1 influenza pandemic in a school in New York cityflu_2009_NYC_school
Data on the 1918 H1N1 influenza pandemic in Baltimore.Flu1918
Data on the 2009 H1N1 influenza pandemic in a school in Pennsylvania.Flu2009
Precompute shape of posterior distribution for epsilonget_shape_epsilon
Precompute shape of posterior distribution for Rget_shape_R_flat
Find clever starting points for MCMC estimationinit_mcmc_params
Set and check parameter settings for 'estimate_R()'make_config
Create list of MCMC control parametersmake_mcmc_control
Data on the 1861 measles epidemic in Hagelloch, Germany.Measles1861
Data on Middle East Respiratory Syndrome (MERS) in Saudi Arabia.mers_2014_15
Mock data on a rotavirus epidemic.MockRotavirus
Overall Infectivity Due To Previously Infected Individualsoverall_infectivity
Function to ensure compatibility with EpiEstim versions <2.0OverallInfectivity
Plot outputs of 'estimate_R()'plot.estimate_R plot.wallinga_teunis
Process incidence input for multivariant analysesprocess_I_multivariant
Sample from the posterior R distributionsample_posterior_R
Data on the 2003 SARS epidemic in Hong Kong.SARS2003
Distribution names valid when using MCMC to estimate SI from datasi_from_data_valid_distrs
Data on the 1972 smallpox epidemic in KosovoSmallpox1972
Estimate case reproduction number using the Wallinga and Teunis methodwallinga_teunis wallinga_teunis.data.frame wallinga_teunis.default wallinga_teunis.incidence wallinga_teunis.incidence2 wallinga_teunis.integer wallinga_teunis.numeric
Function to ensure compatibility with EpiEstim versions <2.0WT