get.transdist.theta {IDSpatialStats} | R Documentation |
Get weights of transmission distance theta
Description
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.
Usage
get.transdist.theta(
wal.teun.mat,
cases,
gen.t.mean,
max.sep,
ret.theta.mat = FALSE
)
Arguments
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) |
Value
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.
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 transdist:
est.transdist()
,
est.transdist.bootstrap.ci()
,
est.transdist.temporal()
,
est.transdist.temporal.bootstrap.ci()
,
est.transdist.theta.weights()
Examples
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)