est.R0.TD: Estimate the Time-Dependent reproduction number

View source: R/est.R0.TD.R

est.R0.TDR Documentation

Estimate the Time-Dependent reproduction number

Description

Estimate the Time-Dependent reproduction number, R(t), as defined by Wallinga & Teunis, by exploring all possible pairs of infectors/infectees across likely transmission trees.

Usage

est.R0.TD(
  epid,
  GT,
  import = NULL,
  n.t0 = NULL,
  t = NULL,
  begin = NULL,
  end = NULL,
  date.first.obs = NULL,
  time.step = 1,
  q = c(0.025, 0.975),
  correct = TRUE,
  nsim = 10000,
  checked = FALSE,
  ...
)

Arguments

epid

Object containing epidemic curve data.

GT

Generation time distribution from generation.time().

import

Vector of imported cases.

n.t0

Initial number of cases at the beginning of the outbreak.

t

Vector of dates at which incidence was observed.

begin

At what time estimation begins (unused by this method, just there for plotting purposes).

end

At what time estimation ends (unused by this method, just there for plotting purposes).

date.first.obs

Optional date of first observation, if t not specified.

time.step

Optional. If date of first observation is specified, number of day between each incidence observation.

q

Quantiles for R(t) confidence level. By default, 2.5% and 97.5%.

correct

Boolean. Correction for cases not yet observed (real time).

nsim

Number of simulations to be run to compute quantiles for R(t)

checked

Internal flag used to check whether integrity checks were ran or not.

...

Parameters passed to inner functions.

Details

For internal use. Called by estimate.R().

The confidence interval is computed by multinomial simulations at each time step, using the expected value of R.

Value

A list with components:

R

vector of R values.

conf.int

95% confidence interval for estimates.

P

Matrix of who infected whom.

p

Probability of who infected whom (values achieved by normalizing P matrix).

GT

Generation time distribution used in the computation.

epid

Original epidemic data.

import

Vector of imported cases.

pred

Theoretical epidemic data, computed with estimated values of R.

begin

Starting date for the fit.

begin.nb

The number of the first day used in the fit.

end

The end date for the fit.

end.nb

The number of the last day used for the fit.

data.name

Name of the data used in the fit.

call

Call used for the function.

method

Method for estimation.

method.code

Internal code used to designate method.

Note

This is the implementation of the method provided by Wallinga & Teunis (2004). Correction for estimation in real time is implemented as in Cauchemez et al, AJE (2006).

If imported cases are provided, they are counted in addition to autonomous cases. The final plot will show overall incidence.

Author(s)

Pierre-Yves Boelle, Thomas Obadia

References

Wallinga, J., and Teunis P. "Different Epidemic Curves for Severe Acute Respiratory Syndrome Reveal Similar Impacts of Control Measures." American Journal of Epidemiology 160, no. 6 (2004): 509.
Cauchemez S., and Valleron AJ. "Estimating in Real Time the Efficacy of Measures to Control Emerging Communicable Diseases" American Journal of Epidemiology 164, no. 6 (2006): 591.

Examples

#Loading package
library(R0)

## Data is taken from the paper by Nishiura for key transmission parameters of an institutional
## outbreak during 1918 influenza pandemic in Germany)

data(Germany.1918)
mGT <- generation.time("gamma", c(3, 1.5))
TD <- est.R0.TD(Germany.1918, mGT, begin=1, end=126, nsim=100)
# Warning messages:
# 1: In est.R0.TD(Germany.1918, mGT) : Simulations may take several minutes.
# 2: In est.R0.TD(Germany.1918, mGT) : Using initial incidence as initial number of cases.
TD
# Reproduction number estimate using  Time-Dependent  method.
# 2.322239 2.272013 1.998474 1.843703 2.019297 1.867488 1.644993 1.553265 1.553317 1.601317 ...

## An interesting way to look at these results is to agregate initial data by longest time unit,
## such as weekly incidence. This gives a global overview of the epidemic.
TD.weekly <- smooth.Rt(TD, 7)
TD.weekly
# Reproduction number estimate using  Time-Dependant  method.
# 1.878424 1.580976 1.356918 1.131633 0.9615463 0.8118902 0.8045254 0.8395747 0.8542518 0.8258094..
plot(TD.weekly)

R0 documentation built on Sept. 26, 2023, 5:10 p.m.

Related to est.R0.TD in R0...