Learn R Programming

EpiEstim (version 1.1-2)

WT: Estimation of the case reproduction number using the Wallinga and Teunis method

Description

WT estimates the case reproduction number of an epidemic, given the incidence time series and the serial interval distribution.

Usage

WT(I, T.Start, T.End, 
	method=c("NonParametricSI","ParametricSI"), 
    Mean.SI=NULL, Std.SI=NULL,
    SI.Distr=NULL, nSim=10, 
    plot=FALSE, leg.pos="topright")

Arguments

I

vector of non-negative integers containing the incidence time series.

T.Start,T.End

vectors of positive integers giving the starting end ending times of each window over which the reproduction number will be estimated. These must be in ascending order, and so that for all i, T.Start[i]<=T.End[i]. T.Start[1] should be strictly after the first day with non null incidence.

method

one of "NonParametricSI" or "ParametricSI" (see details).

Mean.SI

for method "ParametricSI" ; positive real giving the mean serial interval.

Std.SI

for method "ParametricSI" ; non negative real giving the stadard deviation of the serial interval.

SI.Distr

for method "NonParametricSI" ; vector of probabilities giving the discrete distribution of the serial interval, starting with SI.Distr[1] (probability that the serial interval is zero), which should be zero.

nSim

a positive integer giving the number of simulated epidemic trees used for computation of the confidence intervals of the case reproduction number (see details).

plot

logical. If TRUE (default is FALSE), output is plotted (see value).

leg.pos

one of "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right", "center" or xy.coords(x, y), with x and y real numbers. This specifies the position of the legend in the plot. Alternatively, locator(1) can be used ; the user will then need to click where the legend needs to be written.

Value

a list with components:

R

a dataframe containing: the times of start and end of each time window considered ; the estimated mean, std, and 0.025 and 0.975 quantiles of the reproduction number for each time window.

SIDistr

a dataframe containing: for method "NonParametricSI", the mean and standard deviation of the discrete serial interval distribution; for method "ParametricSI", the discrete serial interval distribution.

Details

Estimates of the case reproduction number for an epidemic over predefined time windows can be obtained, for a given discrete distribution of the serial interval, as proposed by Wallinga and Teunis (AJE, 2004). Confidence intervals are obtained by simulating a number (nSim) of possible transmission trees.

The methods vary in the way the serial interval distribution is specified.

----------------------- method "NonParametricSI" -----------------------

The discrete distribution of the serial interval is directly specified in the argument SI.Distr.

If plot is TRUE, 3 plots are produced. The first one shows the epidemic curve. The second one shows the posterior median and 95% credible interval of the reproduction number. The estimate for a time window is plotted at the end of the time window. The position of the legend on that graph can be monitored by the argument leg.pos (default is "topright"). The third plot shows the discrete distribution of the serial interval.

----------------------- method "ParametricSI" -----------------------

The mean and standard deviation of the continuous distribution of the serial interval are given in the arguments Mean.SI and Std.SI. The discrete distribution of the serial interval is derived automatically using DiscrSI.

If plot is TRUE, 3 plots are produced, which are identical to the ones for method "NonParametricSI" .

References

Cori, A. et al. A new framework and software to estimate time-varying reproduction numbers during epidemics. (submitted) Wallinga, J. and P. Teunis (2004). Different epidemic curves for severe acute respiratory syndrome reveal similar impacts of control measures. Am J Epidemiol 160(6): 509-516.

See Also

DiscrSI, EstimateR

Examples

Run this code
# NOT RUN {
## load data on pandemic flu in a school in 2009
data("Flu2009")

## estimate the case reproduction number (method "NonParametricSI")
WT(Flu2009$Incidence, T.Start=2:26, T.End=8:32, method="NonParametricSI", 
    SI.Distr=Flu2009$SI.Distr, plot=TRUE, leg.pos=xy.coords(1,1.75), nSim=100)
# the second plot produced shows, at each each day, 
# the estimate of the cqse reproduction number over the 7-day window finishing on that day.

## estimate the case reproduction number (method "ParametricSI")
WT(Flu2009$Incidence, T.Start=2:26, T.End=8:32, method="ParametricSI", 
    Mean.SI=2.6, Std.SI=1.5, plot=TRUE, nSim=100)
# the second plot produced shows, at each each day, 
# the estimate of the cqse reproduction number over the 7-day window finishing on that day.

# }

Run the code above in your browser using DataLab