Description Usage Arguments Details Examples
View source: R/DENSpatialSeasonal.R
Main wrapper function for running a single realisation of the dengue spatial model, may take a while to run depending on specification
1 2 | DEN.spatial.seasonal(weekdates, fitdat, pastdat, sgpop, unipix, pixdistmat,
steprun, seasonal_vector, seasonal_start, paramsList = NULL)
|
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 |
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 |
seasonal_vector |
A vector of multipliers to change human-mosquito contact rate, for each day of the year, to account for seasonality |
seasonal_start |
Day in the year for the start of the model |
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 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(sgdat)
data(sgpop)
data(seasonal_vector)
data(sero)
sgpop <- pop.process(sgpop, agg = 10)
sero <-aggregate(sero, 10, fun = mean)
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.seasonal(weekdates,
fitdat = sgdat,
pastdat = sgdat,
sgpop,
unipix,
pixdistmat,
steprun = 365,
seasonal_vector,
seasonal_start = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.