DEN.spatial: Run a single realisation of the spatial dengue model

Description Usage Arguments Details Examples

View source: R/DENSpatial.R

Description

Main wrapper function for running a single realisation of the dengue spatial model, may take a while to run depending on specification

Usage

1
2
DEN.spatial(weekdates, fitdat, pastdat, sgpop, unipix, pixdistmat, steprun,
  paramsList = NULL)

Arguments

weekdates

Two element vector of the start and end weeks of the simulation over which the model will be evaluated over

fitdat

Data frame of the locations, numbers and timings (in weeks) of cases to fit the model to, see ?sgdat

pastdat

Data frame of the locations, numbers and timings (in weeks) of all cases in the dataset (is used to generate the starting immunity profile), see ?sgdat

sgpop

Raster containing the number of people residing in each patch, see ?sgpop

unipix

Universal pixel lookup table, see ?make.unipix

pixdistmat

A patch distance matrix, see example

steprun

integer, number of days for which the simulation should run, excluding burn in period

paramsList

Optional parameter list. If not supplied returns to defaults, see tutorial for full parameter list, see ?model.run for full list and explanation of parameters

Details

This function undertakes three main processes: i) fills in parameters with default options if not supplied, ii) generates a human movement matrix between patches, ii) runs the model simulation. within "paramsList()". Missing parameters will return to their default values. This function returns a outputs in a three element list giving: i) daily counts of each model state (S, I, R, etc) sumed across the whole landscape, ii) daily counts of each model state for every patch, iii) A treatment log (of length = number of steps) detailing which patches were treated each day

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(sgdat)
data(sgpop)
sgpop <- pop.process(sgpop, agg = 10)
unipix <- make.unipix(sgpop)
pixdistmat <- distm(cbind(unipix$x, unipix$y))
sgdat <- data.frame(sgdat, patchID = apply(cbind(sgdat[, 3:2]), 1, pix.id.find, unipix))
weekdates <- c(40, 92)
# model run with default parameters
denmod_sim <- DEN.spatial(weekdates, sgdat, sgdat, sgpop, unipix, pixdistmat, 365)
# model run with reactive drug deployment
drugtreat = data.frame(EffCoverage = 0.9, Duration = 30, Radius = 1000, Delay = 0)
denmod_sim_drugs <- DEN.spatial(weekdates, sgdat, unipix, pixdistmat, 365, paramsList = list(drugtreat = drugtreat))

obrady/SpatialDengue documentation built on Nov. 27, 2020, 12:13 p.m.