A R6::R6Class class representing fixed settings
for a spatially-explicit demographic-based SIRI model of disease dynamics. It
extends the poems::SimulationModel class with parameters for the
disease_simulator function. It inherits functionality for
creating a nested model, whereby a nested template model with fixed
parameters is maintained when a model is cloned for various sampled
parameters. Also provided are extensions to the methods for checking the
consistency and completeness of model parameters.
poems::GenericClass -> poems::GenericModel -> poems::SpatialModel -> poems::SimulationModel -> DiseaseModel
attachedA list of dynamically attached attributes (name-value pairs).
simulation_functionName (character string) or source path of the default simulation function, which takes a model as an input and returns the simulation results.
model_attributesA vector of model attribute names.
regionA poems::Region (or inherited class) object specifying
the study region.
coordinatesData frame (or matrix) of X-Y population (WGS84) coordinates in longitude (degrees West) and latitude (degrees North) (get and set), or distance-based coordinates dynamically returned by region raster (get only).
random_seedNumber to seed the random number generation for stochasticity.
replicatesNumber of replicate simulation runs.
time_stepsNumber of simulation time steps.
years_per_stepNumber of years per time step.
populationsNumber of population cells.
initial_abundanceArray (matrix) or raster (stack) of initial abundance values at each population cell (for each age/stage).
demographic_stochasticityBoolean for choosing demographic stochasticity for transition, dispersal, harvest and/or other processes.
standard_deviationStandard deviation matrix (or single value) for applying environmental stochasticity to transition rates.
correlationSimulator-dependent attribute or list of attributes
for describing/parameterizing the correlation strategy utilized when
applying environmental stochasticity and/or other processes (see
poems::population_simulator).
stagesNumber of life cycle stages (default 1).
compartmentsNumber of disease compartments (default 1).
results_breakdownA string with one of these values: "segments" (default), "compartments", "stages" or "pooled." "segments" returns results for each segment (stage x compartment combination.) "compartments" returns results for each disease compartment. "stages" returns results for each life cycle stage. "pooled" returns results that are not broken down by stage or compartment.
carrying_capacityArray (matrix), or raster (stack) of carrying capacity values at each population cell (across time).
density_dependenceSimulator-dependent function, attribute or list
of attributes for describing/parameterizing the density dependence
strategy utilized (see poems::population_simulator).
growth_rate_maxMaximum growth rate (utilized by density dependence processes).
fecundityA vector of fecundity rates, one for each combination of
stages and compartments for which fecundity applies (see
fecundity_mask below). If fecundity varies among seasons, a list
of fecundity vectors with the same length as seasons may be
provided. Required input.
density_stagesArray of booleans or numeric (0-1) for each stage to indicate (the degree to) which stages are affected by density (default is 1 for all stages).
translocationSimulator-dependent function, attribute or list of
attributes for describing/parameterizing translocation (management)
strategies utilized (see poems::population_simulator).
harvestSimulator-dependent function, attribute or list of
attributes for describing/parameterizing a harvest (organism
removal/hunting) strategy (see poems::population_simulator).
mortalitySimulator-dependent function, attribute or list of
attributes to describe/parameterize a spatio-temporal mortality
strategy (see poems::population_simulator).
dispersalSimulator-dependent function, attribute or list of
attributes for describing/parameterizing the dispersal (migration)
strategy utilized (see disease_simulator).
dispersal_stagesArray of relative dispersal (0-1) for each stage to indicate the degree to which each stage participates in dispersal (default is 1 for all stages).
dispersal_source_n_kSimulator-dependent attribute for
describing/parameterizing dispersal dependent on source population
abundance divided by carrying capacity (see
disease_simulator).
dispersal_target_kSimulator-dependent attribute for
describing/parameterizing dispersal dependent on target population
carrying capacity (see disease_simulator).
dispersal_target_nSimulator-dependent attribute (default is list
with threshold and cutoff) of attributes for
describing/parameterizing dispersal dependent on target population
abundance (see disease_simulator).
dispersal_target_n_kSimulator-dependent attribute (default is
list with threshold and cutoff) of attributes for
describing/parameterizing dispersal dependent on target population
abundance/capacity (see poems::population_simulator).
abundance_thresholdAbundance threshold (that needs to be exceeded) for each population to persist.
seasonsNumber of seasons in a year (default 1.) The first one is always treated as the breeding season.
simulation_orderA vector of simulation process names in configured order of execution.
results_selectionList of attributes to be included in the returned results of each simulation run, selected from: "abundance", "ema", "extirpation", "extinction_location", "harvested", "occupancy"; "summarize" or "replicate".
attribute_aliasesA list of alternative alias names for model
attributes (form: alias = "attribute") to be used with the set
and get attributes methods.
template_modelNested template model for fixed (non-sampled) attributes for shallow cloning.
sample_attributesVector of sample attribute names (only).
required_attributesVector of required attribute names (only), i.e. those needed to run a simulation.
error_messagesA vector of error messages encountered when setting model attributes.
warning_messagesA vector of warning messages encountered when setting model attributes.
Inherited methods
poems::GenericModel$get_attribute()poems::GenericModel$get_attribute_aliases()poems::SimulationModel$get_attribute_names()poems::SimulationModel$get_attributes()poems::SimulationModel$incomplete_attributes()poems::SimulationModel$inconsistent_attributes()poems::SimulationModel$is_complete()poems::SimulationModel$is_consistent()poems::SimulationModel$list_completeness()poems::SimulationModel$new_clone()poems::SimulationModel$set_attributes()
new()Initialization method sets default aliases and given attributes individually and/or from a list.
DiseaseModel$new(attribute_aliases = NULL, ...)attribute_aliasesA list of alternative alias names for model
attributes (form: alias = "attribute") to be used with the set and
get attributes methods.
...Parameters passed via a params list or individually.
set_sample_attributes()Sets the names (only - when params is a vector) and values (when params is a list and/or when name-value pairs are provided) of the sample attributes for the model.
DiseaseModel$set_sample_attributes(params = list(), ...)paramsList of parameters/attributes (names and values) or array of names only.
...Parameters/attributes passed individually.
list_consistency()Returns a boolean to indicate if (optionally selected or all) model attributes (such as dimensions) are consistent.
DiseaseModel$list_consistency(params = NULL)paramsOptional array of parameter/attribute names.
List of booleans (or NAs) to indicate consistency of selected/all attributes.
clone()The objects of this class are cloneable with this method.
DiseaseModel$clone(deep = FALSE)deepWhether to make a deep clone.