View source: R/transdistfuncs.r
get.transdist.theta | R Documentation |
This function estimates the weights of each theta (number of transmission events separating cases at two time points). A randomized transmission tree is drawn and the number of transmission events separating cases at two time points is calculated based on probabilies found in the Wallinga-Teunis matrix.
get.transdist.theta(
wal.teun.mat,
cases,
gen.t.mean,
max.sep,
ret.theta.mat = FALSE
)
wal.teun.mat |
a Wallinga-Teunis matrix produced by the |
cases |
a vector of case times for each case |
gen.t.mean |
the mean generation time of the infecting pathogen |
max.sep |
maximum number of transmission events allowed between two cases |
ret.theta.mat |
logical value which returns the matrix of estimated theta values (default = FALSE) |
a three-dimensional array containing normalized theta weights. Columns and rows represent unique case times. The third dimension is the number of transmission events between two cases.
John Giles, Justin Lessler, and Henrik Salje
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 transdist:
est.transdist()
,
est.transdist.bootstrap.ci()
,
est.transdist.temporal()
,
est.transdist.temporal.bootstrap.ci()
,
est.transdist.theta.weights()
case.times <- c(1,2,2,3,3)
gen <- c(0, 2/3, 1/3, 0, 0)
t.density <- gen/sum(gen)
gen.time <- 2 # mean generation time
wt <- est.wt.matrix(case.times=case.times, gen.t.dist=t.density)
ngen <- round((max(case.times) - min(case.times)) / gen.time) + 1 # Number of generations
a <- get.transdist.theta(wal.teun.mat=wt,
cases=case.times,
gen.t.mean=gen.time,
max.sep=ngen*2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.