est.R0.ML: Estimate R0 by Maximum Likelihood

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

est.R0.MLR Documentation

Estimate R0 by Maximum Likelihood

Description

Estimate R0 by maximum likelihood, assuming Poisson distribution of offsprings generated from infected individuals at each time step.

Usage

est.R0.ML(
  epid,
  GT,
  import = NULL,
  t = NULL,
  begin = NULL,
  end = NULL,
  date.first.obs = NULL,
  time.step = 1,
  range = c(0.01, 50),
  unknown.GT = FALSE,
  impute.incid = FALSE,
  checked = FALSE,
  ...
)

Arguments

epid

Object containing epidemic curve data.

GT

Generation time distribution from generation.time().

import

Vector of imported cases.

t

Vector of dates at which incidence was observed.

begin

At what time estimation begins.

end

Time at which to end computation.

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.

range

Range of values over which the MLE must be explored.

unknown.GT

Boolean value. When GT distribution is unknown, it is estimated jointly (see details).

impute.incid

Boolean value. If TRUE, will impute unobserved cases at the beginning of the epidemic to correct for censored data.

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().

White & Pagano (2009) detail two maximum likelihood methods for estimatig the reproduction ratio. The principle of the methods described by White & all is to compute the expected number of cases in the future, and optimise to get R using a Poisson distribution.

The first (and used by default in this package) assumes that the serial interval distirbution is known, and subsequently the likelihood is only maximised depending on the value of R.

The second method can be used if the serial interval distribution is unknown: in that case, the generation time is set to follow a Gamma distribution with two parameters (size, shape), and the optimization routine finds the values of R, size and shape that maximize the likelihood. However, the epidemic curve must be long enough to account for a whole generation. The authors showed that this is achieved when the cumulated amount of incident cases reaches approximately 150. When using this method, the flag unknown.GT must be set to TRUE. GT must still be provided with a R0.GT-class object, though its mean and sd will be recycled as starting value for the optimization routine.

The 95% confidence interval is achieved by profiling the likelihood.

In addition to the estimation method, we implemented a framework to impute unobserved incidence data, when the epidemic curve is found to not be available from the start of the outbreak. The details of this method are availble in the Supplementary Material S1 from \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1472-6947-12-147")}Obadia et al., 2012.

Value

A list with components:

R

The estimate of the reproduction ratio.

conf.int

The 95% confidence interval for the R estimate.

epid

Original or augmented epidemic data, depending whether impute.incid() is set to FALSE or TRUE.

epid.orig

Original epidemic data.

GT

Generation time distribution uised in the computation.

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 las day used for the fit.

pred

Prediction on the period used for the fit.

Rsquared

Correlation coefficient between predicted curve (by fit.epid()) and observed epidemic curve.

call

Call used for the function.

method

Method used for fitting.

method.code

Internal code used to designate method.

Note

This is the implementation of the method provided by White & Pagano (2009).

Author(s)

Pierre-Yves Boelle, Thomas Obadia

References

White, L.F., J. Wallinga, L. Finelli, C. Reed, S. Riley, M. Lipsitch, and M. Pagano. "Estimation of the Reproductive Number and the Serial Interval in Early Phase of the 2009 Influenza A/H1N1 Pandemic in the USA." Influenza and Other Respiratory Viruses 3, no. 6 (2009): 267-276.

Examples

#Loading package
library(R0)

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

data(Germany.1918)
mGT <- generation.time("gamma", c(2.45, 1.38))
est.R0.ML(Germany.1918, mGT, begin=1, end=27, range=c(0.01,50))
# Reproduction number estimate using  Maximum Likelihood  method.
# R :  1.307222[ 1.236913 , 1.380156 ]

res <- est.R0.ML(Germany.1918, mGT, begin=1, end=27, range=c(0.01,50))
plot(res)

## no change in R with varying range 
## (dates here are the same index as before. Just to illustrate different use)
est.R0.ML(Germany.1918, mGT, begin="1918-09-29", end="1918-10-25", range=c(0.01,100))
# Reproduction number estimate using  Maximum Likelihood  method.
# R :  1.307249[ 1.236913 , 1.380185 ]



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

Related to est.R0.ML in R0...