Learn R Programming

IDSpatialStats (version 0.4.0)

est.wt.matrix: Calculate the Infector-Infectee Wallinga-Teunis matrix

Description

A function which takes the time of each case occurrence, the generation time distribution of the infecting pathogen, and the matrix of basic Wallinga-Teunis weights and estimates the probability that an infectee occurring time step j (columns) was infected by a case occurring at time i (rows).

Usage

est.wt.matrix(case.times, gen.t.dist, basic.wt.weights = NULL)

Value

a numerical matrix with the number of columns and rows equal to the number of cases in the epidemic

Arguments

case.times

a vector giving the occurrence time for each case

gen.t.dist

a vector giving the generation time distribution for the infecting pathogen

basic.wt.weights

a matrix giving the basic normalized Wallinga-Teunis weights for each time step (output from the est.wt.matrix.weights function). If this argument is NULL (the default), the basic Wallinga-Teunis matrix will be calculated automatically.

Author

John Giles, Justin Lessler, and Henrik Salje

References

Salje H, Cummings DAT and Lessler J (2016). “Estimating infectious disease transmission distances using the overall distribution of cases.” Epidemics, 17, pp. 10–18. ISSN 1755-4365, doi: 10.1016/j.epidem.2016.10.001.

See Also

Other est.wt: est.transdist(), est.wt.matrix.weights()

Examples

Run this code
# \donttest{

case.times <- c(1,2,2,3,3)
gen <- c(0, 2/3, 1/3, 0, 0)
t.density <- gen/sum(gen)

a <- est.wt.matrix(case.times=case.times, gen.t.dist=t.density)

# }

Run the code above in your browser using DataLab