# epidata: Simulates epidemic for the specified model type and... In EpiILM: Spatial and Network Based Individual Level Models for Epidemics

## Description

This function allows the user to simulate epidemics under different models and scenarios

## Usage

 1 2 3 4 5 epidata (type, n, tmin = NULL, tmax, alpha, beta, spark = NULL, Sformula = NULL, x = NULL, y = NULL, inftime = NULL, infperiod = NULL, contact = NULL, tempseed = NULL) 

## Arguments

 type Type of compartment framework, with the choice of "SI" for Susceptible-Infectious diseases and "SIR" for Susceptible-Infectious-Removed n Population size tmin The time point at which simulation begins, default value is one tmax The last time point of simulation alpha Susceptibility parameter (>0) beta Spatial parameter(s) (>0) or network parameter (s) (>0) if contact is used spark Sparks parameter (>=0), representing infections unexplained by other parts of the model (eg. infections coming in from outside the observed population), default value is zero Sformula An object of class formula. See formula Individual-level covariate information associated with susceptibility can be passed through this argument. An expression of the form  ~ model is interpreted as a specification that the susceptibility function, Ω_s(i) is modelled by a linear predictor specified symbolically by the model term. Such a model consists of a series of terms separated by + and - operators. If there is no covariate information, Sformula is null x X coordinates of individuals y Y coordinates of individuals inftime Times at which individuals are infected to initialize epidemic simulation infperiod Length of infectious period for each individual contact Contact network matrix (matrices) tempseed Integer seed value to initialize the (Fortran) random number generator, default value is a random seed.

## Details

We consider following two individual level models:

Spatial model:

P(i,t) =1- \exp\{-Ω_s(i) ∑_{j \in I(t)}{d_{ij}^{-β}- \varepsilon}\}

Network model:

P(i,t) =1- \exp\{-Ω_s(i) ∑_{j \in I(t)}{(β_1 C^{(1)}_{ij}} + … + β_n C^{(n)}_{ij} )- \varepsilon\}

where P(i,t) is the probability that susceptible individual i is infected at time point t, becoming infectious at time t+1; and Ω_s(i) is a susceptibility function which accommodates potential risk factors associated with susceptible individual i contracting the disease.

## Value

 inftime  Times at which individuals become infected/infectious removaltime Times at which individuals are removed, only when type = "SIR" is specified.

## References

Deardon R, Brooks, S. P., Grenfell, B. T., Keeling, M. J., Tildesley, M. J., Savill, N. J., Shaw, D. J., Woolhouse, M. E. (2010). Inference for individual level models of infectious diseases in large populations. Statistica Sinica, 20, 239-261.

Rob Deardon, Xuan Fang, and Grace P. S. Kwong (2014). Statistical modelling of spatio-temporal infectious disease transmission in analyzing and modeling Spatial and temporal dynamics of infectious diseases, (Ed: D. Chen, B. Moulin, J. Wu), John Wiley & Sons. Chapter 11.

## 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 ## Example 1: spatial SI model # generate 100 individuals x <- runif(100, 0, 10) y <- runif(100, 0, 10) covariate <- runif(100, 0, 2) out <- epidata(type = "SI",n = 100, Sformula = ~covariate, tmax = 15, alpha = c(0.1, 0.3), beta = 5.0, x = x, y = y) # Plots of epidemic progression (optional) epispatial(type = "SI", x = x, y = y, inftime = out$inftime) epicurve(type = "SI", inftime = out$inftime, plottype = "newinfect") ## Example 2: spatial SIR model # generate infectious period(=3) for 100 individuals lambda <- rep(3, 100) epidata(type = "SIR", n = 100, tmax = 15, alpha = 0.3, beta = 5.0, infperiod = lambda, x = x, y = y) ## Example 3: SI network model ## Not run: contact1 <- matrix(rbinom(10000, 1, 0.1), nrow = 100, ncol = 100) contact2 <- matrix(rbinom(10000, 1, 0.1), nrow = 100, ncol = 100) diag(contact1[,] ) <- 0 diag(contact2[,] ) <- 0 contact <- array(c(contact1, contact2), dim = c(100, 100, 2)) epidata(type = "SI", n = 100, tmax = 15, alpha = 0.3, beta = c(3.0, 5.0), contact = contact) ## End(Not run) 

EpiILM documentation built on May 2, 2019, 12:20 p.m.