surveillance (version 1.12.1)

twinstim_iaf: Temporal and Spatial Interaction Functions for twinstim

Description

A twinstim model as described in Meyer et al. (2012) requires the specification of the spatial and temporal interaction functions ($f$ and $g$, respectively), i.e. how infectivity decays with increasing spatial and temporal distance from the source of infection. It is of course possible to define own functions (see siaf and tiaf, respectively), but the package already predefines some useful dispersal kernels returned by the constructor functions documented here. See Meyer and Held (2014) for various spatial interaction functions, and Meyer et al. (2016, Section 3, available as vignette("twinstim")) for an illustration of the implementation.

Usage

# predefined spatial interaction functions
siaf.constant()
siaf.step(knots, maxRange = Inf, nTypes = 1, validpars = NULL)
siaf.gaussian(nTypes = 1, logsd = TRUE, density = FALSE,
              F.adaptive = TRUE, effRangeMult = 6, validpars = NULL)
siaf.powerlaw(nTypes = 1, validpars = NULL)
siaf.powerlawL(nTypes = 1, validpars = NULL)
siaf.student(nTypes = 1, validpars = NULL)

# predefined temporal interaction functions tiaf.constant() tiaf.step(knots, maxRange = Inf, nTypes = 1, validpars = NULL) tiaf.exponential(nTypes = 1, validpars = NULL)

Arguments

knots
numeric vector of distances at which the step function switches to a new height. The length of this vector determines the number of parameters to estimate. For identifiability, the step function has height 1 in the first interval $[0,knots_1)$
maxRange
a scalar larger than any of knots. Per default (maxRange=Inf), the step function never drops to 0 but keeps the last height for any distance larger than the last knot. However, this might not work in some cases, w
nTypes
determines the number of parameters ((log-)scales or (log-)shapes) of the kernels. In a multitype epidemic, the different types may share the same spatial interaction function, in which case nTypes=1. Otherwise nTypes
logsd
logical indicating if the kernel should be parametrized with the log-standard deviation as the parameter in question to enforce positivity. This is the recommended default and avoids constrained optimisation (L-BFGS-B) or the use of
density
logical indicating if the density or just its kernel should be used. If density=TRUE, siaf.gaussian uses the density of the bivariate, isotropic normal distribution as the spatial interaction function. Otherwise (defa
F.adaptive
If F.adaptive = TRUE, then an adaptive bandwidth of adapt*sd will be used in the midpoint-cubature (polyCub.midpoint in package polyCub) of t
effRangeMult
determines the effective range for numerical integration in terms of multiples of the standard deviation $\sigma$ of the Gaussian kernel, i.e. with effRangeMult=6 the $6 \sigma$ region around the event is considered as the rel
validpars
function taking one argument, the parameter vector, indicating if it is valid (see also siaf). If logsd=FALSE and one prefers not to use method="L-BFGS-B" for fitting the

Value

  • The specification of an interaction function, which is a list. See siaf and tiaf, respectively, for a description of its components.

encoding

latin1

Details

Evaluation of twinstim's likelihood involves cubature of the spatial interaction function over polygonal domains. Various approaches have been compared by Meyer (2010, Section 3.2) and a new efficient method, which takes advantage of the assumed isotropy, has been proposed by Meyer and Held (2014, Supplement B, Section 2) for evaluation of the power-law kernels. These cubature methods are available in the dedicated Rpackage polyCub and used by the kernels implemented in surveillance. The readily available spatial interaction functions are defined as follows: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object] The predefined temporal interaction functions are defined as follows: [object Object],[object Object],[object Object]

References

Meyer, S. (2010): Spatio-Temporal Infectious Disease Epidemiology based on Point Processes. Master's Thesis, Ludwig-Maximilians-Universit{ae}t M{ue}nchen. Available as http://epub.ub.uni-muenchen.de/11703/

Meyer, S., Elias, J. and H{oe}hle, M. (2012): A space-time conditional intensity model for invasive meningococcal disease occurrence. Biometrics, 68, 607-616. 10.1111/j.1541-0420.2011.01684.x

Meyer, S. and Held, L. (2014): Power-law models for infectious disease spread. The Annals of Applied Statistics, 8 (3), 1612-1639. 10.1214/14-AOAS743

Meyer, S., Held, L. and H{oe}hle, M. (2016): Spatio-temporal analysis of epidemic phenomena using the Rpackage surveillance. Journal of Statistical Software. In press. Preprint available at http://arxiv.org/abs/1411.0416

See Also

twinstim, siaf, tiaf, and package polyCub for the involved cubature methods.

Examples

Run this code
# constant temporal dispersal
tiaf.constant()
# step function kernel
tiaf.step(c(3,7), maxRange=14, nTypes=2)
# exponential decay specification
tiaf.exponential()

# Type-dependent Gaussian spatial interaction function using an adaptive
# two-dimensional midpoint-rule to integrate it over polygonal domains
siaf.gaussian(2, F.adaptive=TRUE)

# Type-independent power-law kernel
siaf.powerlaw()

# "lagged" power-law
siaf.powerlawL()

# (reparametrized) t-kernel
siaf.student()

# step function kernel
siaf.step(c(10,20,50), maxRange=100)

Run the code above in your browser using DataLab