get.transdist.theta: Get weights of transmission distance theta

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

View source: R/transdistfuncs.r

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

1
2
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 est.wt.matrix function

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.bootstrap.ci, est.transdist.temporal.bootstrap.ci, est.transdist.temporal, est.transdist.theta.weights, est.transdist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

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