Learn R Programming

IDSpatialStats

This GitHub repository provides source code for the IDSpatialStats R package, which is designed to help epidemiologists assess the scale of spatial and temporal dependence in epidemic case occurrence data.

The current implementation of the package includes a function which simulates infectious disease spread as a spatial branching process, along with two novel spatial statistics that estimate: 1) the mean of the spatial transmission kernel, which is a measure of fine-scale spatial dependence between two cases, and 2) the tau-statistic, a measure of global clustering based on pathogen subtype.

Detailed description of the methods can be found here:

The IDSpatialStats R package: Quantifying spatial dependence of infectious disease spread (Giles et al. 2019)

Measuring spatial dependence for infectious disease epidemiology (Lessler et al. 2016)

Estimating infectious disease transmission distances using the overall distribution of cases (Salje et al. 2016)

Installation

To install the offical release of the IDSpatialStats package, open R and type:

install.packages('IDSpatialStats')

To install the install the development version, first install the devtools package and then install IDSpatialStats from source via GitHub:

install.packages('devtools')
devtools::install_github('HopkinsIDD/IDSpatialStats')

Troubleshooting

For general questions, contact package maintainers Justin Lessler (jlessler@unc.edu) or John Giles (jrgiles@uw.edu).

To report bugs or problems with documentation, please go to the Issues page associated with this GitHub page and click new issue.

If you wish to contribute to IDSpatialStats, please get in touch via email and then fork the latest version of the package. After committing your code to your own forked version, submit a pull request when you are ready to share.

Copy Link

Version

Install

install.packages('IDSpatialStats')

Monthly Downloads

158

Version

0.4.0

License

GPL (>= 2)

Maintainer

Justin Lessler

Last Published

July 28th, 2024

Functions in IDSpatialStats (0.4.0)

est.wt.matrix.weights

Estimate matrix of basic Wallinga-Teunis weights
get.cross.PCF

Cross type Pair Correlation Function using homotypic and heterotypic case types
get.pi.bootstrap

Bootstrap get.pi values.
get.pi

Generalized version of get.pi
get.tau

generalized version of get.tau
get.pi.typed.permute

get the null distribution of the get.pi.typed function
get.cross.K

Cross type K function using homotypic and heterotypic case types
get.pi.typed

Optimized version of get.pi for typed data.
get.pi.permute

get the null distribution of the get.pi function
get.pi.ci

Calculate bootstrapped confidence intervals for get.pi values.
get.pi.typed.bootstrap

runs bootstrapping on get.pi.typed
get.tau.typed

Optimized version of get.tau for typed data
get.tau.permute

get the null distribution of the get.tau function
get.theta.ci

Calculate bootstrapped confidence intervals for get.theta values.
get.theta.permute

get the null distribution of the get.theta function
get.tau.typed.permute

get the null distribution for the get.tau.typed function
get.tau.bootstrap

Bootstrap get.tau values.
get.tau.typed.bootstrap

runs bootstrapping for get.tau.typed
get.tau.ci

Bootstrap confidence interval for the get.tau values
get.theta.bootstrap

Bootstrap get.theta values.
get.theta

Generalized version of get.theta
get.theta.typed.bootstrap

runs bootstrapping on get.theta.typed
sim.plot

Plot output of simulated epidemic
get.transdist.theta

Get weights of transmission distance theta
get.theta.typed.permute

get the null distribution of the get.theta.typed function
sim.epidemic

Simulation of an epidemic in space and time
get.theta.typed

Optimized version of get.theta for typed data.
est.wt.matrix

Calculate the Infector-Infectee Wallinga-Teunis matrix
DengueSimRepresentative

Simulated dataset of dengue cases with representative underlying population
est.transdist.bootstrap.ci

Bootstrap mean transmission distance values
est.transdist

Estimate transmission distance
est.transdist.temporal

Change in mean transmission distance over time
est.transdist.theta.weights

Estimate transmission distance theta values by replication
est.transdist.temporal.bootstrap.ci

Bootstrapped confidence intervals for the change in mean transmission distance over time
DengueSimR01

Simulated dataset of dengue transmission with basic reproductive number of 1
DengueSimR02

Simulated dataset of dengue cases with basic reproductive number of 2