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

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/transdistfuncs.r

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

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

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.

Value

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

Author(s)

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

1
2
3
4
5
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)

IDSpatialStats documentation built on Nov. 16, 2019, 1:08 a.m.