DEN.spatial.ensemble: Run a multiple realisations of the spatial dengue model and...

Description Usage Arguments Details Examples

View source: R/DENSpatialEnsemble.R

Description

Runs multiple versions of DEN.spatial and calculates confidence intervals

Usage

1
2
3
4
DEN.spatial.ensemble(weekdates, fitdat, pastdat, unipix, pixdistmat,
  steprun, nruns, qtiles = c(0.025, 0.25, 0.5, 0.75, 0.975),
  ncores = 1, paramsList = NULL, seasonal = FALSE,
  seasonal_vector = NA)

Arguments

weekdates

Two element vector of the start and end weeks of the simulation over which the mdoel 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

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

nruns

Integer, number of stochastic model runs over which to average over

qtiles

vector of quantiles over which results should be summarised (one or more values between 0 and 1)

ncores

number of cpu cores to run simulations over (in parallel). Uses snowfall for parallelisation. Specify cores > 1 (default = 1) for parallel processing

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

seasonal

Logical, whether to use the defaul DEN.spatial function or the seasonal DEN.spatial.seasonal version. If this equals TRUE please supply a seasonal vector see ?DEN.spatial.seasonal

seasonal_vector

A vector of seasonal transmission intensity. See ?DEN.spatial.seasonal

Details

Returns a list with each component summarising the results across multiple model runs at a given quantile, e.g. 0.95, 0.5, 0.05, etc.

Examples

1
2
3
4
5
6
7
8
9
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)
# run model ensemble with default parameters
denmod_sim <- DEN.spatial.ensemble(weekdates, sgdat, sgdat, unipix, pixdistmat, 365, 10)

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