View source: R/transdistfuncs.r
est.wt.matrix.weights | R Documentation |
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.
est.wt.matrix.weights(case.times, gen.t.dist)
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 |
a numerical matrix with the number of columns and rows equal to the number of time steps in the epidemic
John Giles, Justin Lessler, and Henrik Salje
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.
Other est.wt:
est.transdist()
,
est.wt.matrix()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.