prep_simulation: Performs pre-calculations necessary for the simulation of an...

Description Usage Arguments Value Examples

Description

Creates the age mixing matrix and the spatial kernel using the load_contact_mat, calc_dist_mat, calc_dist_kernel and calc_beta functions.

Usage

1
2
prep_simulation(spatial_data, R0 = 1.8, sigma = 1/2.6, age = TRUE,
  k_params = NA)

Arguments

spatial_data

The spatial dataset containing the population data.

R0

The desired R0 for the epidemic

sigma

The desired recovery rate for the epidemic

age

Logical. If TRUE, the simulation will assume four distincts age groups in the population (default). If FALSE, the simulation will assume homogeneous mixing between age groups in the population.

k_params

A list containing the parameter values to be used for the kernel calculation. If omitted, will use the following default values: dist_c=87; alpha=0.95; p=6.6; p2=1.53; aa=35

Value

Returns two matrix objects and one value for beta.

Examples

1
2
3
4
5
#Create a spatial dataset:
test_data = raster(nrow=10, ncol=10, xmn=1, xmx=100000, ymn=1, ymx=100000)
values(test_data) = runif(100, 1, 1000)

prep_simulation(test_data)

qleclerc/epicspatial documentation built on May 21, 2019, 4:06 a.m.