Description Usage Arguments Details Examples
View source: R/DENSpatialEnsemble.R
Runs multiple versions of DEN.spatial and calculates confidence intervals
1 2 3 4 |
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 |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.