est.transdist.bootstrap.ci: Bootstrap mean transmission distance values

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

View source: R/transdistfuncs.r

Description

Runs est.trandsdist on multiple bootstraps of the data and calculates confidence intervals for the mean transmission distance.

Usage

1
2
3
4
est.transdist.bootstrap.ci(epi.data, gen.t.mean, gen.t.sd, t1, max.sep,
  max.dist, n.transtree.reps = 100, mean.equals.sd = FALSE,
  theta.weights = NULL, boot.iter, ci.low = 0.025, ci.high = 0.975,
  parallel = FALSE, n.cores = NULL)

Arguments

epi.data

a three-column matrix giving the coordinates (x and y) and time of infection (t for all cases in an epidemic (columns must be in x, y, t order)

gen.t.mean

mean generation time of the infecting pathogen

gen.t.sd

standard deviation of generation time of the infecting pathogen

t1

time step to begin estimation of transmission distance

max.sep

maximum number of time steps allowed between two cases (passed to the get.transdist.theta function)

max.dist

maximum spatial distance between two cases considered in calculation

n.transtree.reps

number of time to simulate transmission trees when estimating the weights of theta (passed to the est.transdist.theta.weights function, default = 10). Warning: higher values of this parameter cause significant increases in computation time.

mean.equals.sd

logical term indicating if the mean and standard deviation of the transmission kernel are expected to be equal (default = FALSE)

theta.weights

use external matrix of theta weights. If NULL (default) the matrix of theta weights is automatically estimated by calling the est.transdist.theta.weights function

boot.iter

the number of bootstrapped iterations to perform

ci.low

low end of the confidence interval (default = 0.025)

ci.high

high end of the confidence interval (default = 0.975)

parallel

run bootstraps in parallel (default = FALSE)

n.cores

number of cores to use when parallel = TRUE (default = NULL, which uses half the available cores)

Value

a list object containing the point estimate for mean transmission distance and low and high bootstrapped confidence intervals

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set.seed(1)

# Exponentially distributed transmission kernel with mean and standard deviation = 100
dist.func <- alist(n=1, a=1/100, rexp(n, a)) 

# Simulate epidemic
a <- sim.epidemic(R=2.5,
                  gen.t.mean=7,
                  gen.t.sd=2,
                  min.cases=20,
                  tot.generations=5,
                  trans.kern.func=dist.func)

# Estimate mean transmission kernel and its bootstrapped confidence intervals
b <- est.transdist.bootstrap.ci(epi.data=a,
                                gen.t.mean=7,
                                gen.t.sd=2,
                                t1=0,
                                max.sep=1e10,
                                max.dist=1e10,
                                n.transtree.reps=10,
                                mean.equals.sd=TRUE,
                                boot.iter=10,
                                ci.low=0.025,
                                ci.high=0.975,
                                parallel=FALSE)
b

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