est.wt.matrix.weights {IDSpatialStats} | R Documentation |
Estimate matrix of basic Wallinga-Teunis weights
Description
A function called by est.wt.matrix
, which calculates the basic weights in the Wallinga-Teunis matrix given
the time of each case occurrence and the generation time distribution of the pathogen. Code adapted from the R0 package.
Usage
est.wt.matrix.weights(case.times, gen.t.dist)
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 |
Value
a numerical matrix with the number of columns and rows equal to the number of time steps in the epidemic
Author(s)
John Giles, Justin Lessler, and Henrik Salje
References
Boelle P and Obadia T (2015). R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics. R package version 1.2-6, https://CRAN.R-project.org/package=R0.
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()
Examples
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.weights(case.times=case.times, gen.t.dist=t.density)