estimRmcmc {EpiLPS}R Documentation

Estimation of the reproduction number with Laplacian-P-splines via MCMC

Description

This routine estimates the instantaneous reproduction number R_t; the mean number of secondary infections generated by an infected individual at time t (White et al. 2020); by using Bayesian P-splines and Laplace approximations (Gressani et al. 2022). The inference approach is fully stochastic with a Metropolis-adjusted Langevin algorithm. The estimRmcmc() routine estimates R_t based on a time series of incidence counts and a (discretized) serial interval distribution. The negative binomial distribution is used to model incidence count data and P-splines (Eilers and Marx, 1996) are used to smooth the epidemic curve. The link between the epidemic curve and the reproduction number is established via the renewal equation.

Usage

estimRmcmc(incidence, si, K = 30, dates = NULL, niter = 5000, burnin = 2000,
 CoriR = FALSE, WTR = FALSE, priors = Rmodelpriors(), progressbar = TRUE)

Arguments

incidence

A vector containing the incidence time series. If incidence contains NA values at certain time points, these are replaced by the average of the left- and right neighbor counts. If the right neighbor is NA, the left neighbor is used as a replacement value.

si

The (discrete) serial interval distribution.

K

Number of B-splines in the basis.

dates

A vector of dates in format "YYYY-MM-DD" (optional).

niter

The number of MCMC samples.

burnin

The burn-in size.

CoriR

Should the R_t estimate of Cori (2013) be also computed?

WTR

Should the R_t estimate of Wallinga-Teunis (2004) be also computed?

priors

A list containing the prior specification of the model hyperparameters as set in Rmodelpriors. See ?Rmodelpriors.

progressbar

Should a progression bar indicating status of MCMC algorithm be shown? Default is TRUE.

Value

A list with the following components:

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr

References

Gressani, O., Wallinga, J., Althaus, C. L., Hens, N. and Faes, C. (2022). EpiLPS: A fast and flexible Bayesian tool for estimation of the time-varying reproduction number. Plos Computational Biology, 18(10): e1010618.

Cori, A., Ferguson, N.M., Fraser, C., Cauchemez, S. (2013). A new framework and software to estimate time-varying reproduction numbers during epidemics. American Journal of Epidemiology, 178(9):1505–1512.

Wallinga, J., & Teunis, P. (2004). Different epidemic curves for severe acute respiratory syndrome reveal similar impacts of control measures. American Journal of Epidemiology, 160(6), 509-516.

White, L.F., Moser, C.B., Thompson, R.N., Pagano, M. (2021). Statistical estimation of the reproductive number from case notification data. American Journal of Epidemiology, 190(4):611-620.

Eilers, P.H.C. and Marx, B.D. (1996). Flexible smoothing with B-splines and penalties. Statistical Science, 11(2):89-121.

Examples

# Illustration on the 2009 influenza pandemic in Pennsylvania.
data(influenza2009)
epifit_flu <- estimRmcmc(incidence = influenza2009$incidence, dates = influenza2009$dates,
                         si = influenza2009$si[-1], niter = 2500,
                         burnin = 1500, progressbar = FALSE)
tail(epifit_flu$RLPS)
summary(epifit_flu)
plot(epifit_flu)


[Package EpiLPS version 1.3.0 Index]