DiseaseModel {epizootic} | R Documentation |
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
attached
A list of dynamically attached attributes (name-value pairs).
simulation_function
Name (character string) or source path of the default simulation function, which takes a model as an input and returns the simulation results.
model_attributes
A vector of model attribute names.
region
A poems::Region
(or inherited class) object specifying
the study region.
coordinates
Data 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_seed
Number to seed the random number generation for stochasticity.
replicates
Number of replicate simulation runs.
time_steps
Number of simulation time steps.
years_per_step
Number of years per time step.
populations
Number of population cells.
initial_abundance
Array (matrix) or raster (stack) of initial abundance values at each population cell (for each age/stage).
demographic_stochasticity
Boolean for choosing demographic stochasticity for transition, dispersal, harvest and/or other processes.
standard_deviation
Standard deviation matrix (or single value) for applying environmental stochasticity to transition rates.
correlation
Simulator-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
).
stages
Number of life cycle stages (default 1).
compartments
Number of disease compartments (default 1).
results_breakdown
A 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_capacity
Array (matrix), or raster (stack) of carrying capacity values at each population cell (across time).
density_dependence
Simulator-dependent function, attribute or list
of attributes for describing/parameterizing the density dependence
strategy utilized (see poems::population_simulator
).
growth_rate_max
Maximum growth rate (utilized by density dependence processes).
fecundity
A 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_stages
Array 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).
translocation
Simulator-dependent function, attribute or list of
attributes for describing/parameterizing translocation (management)
strategies utilized (see poems::population_simulator
).
harvest
Simulator-dependent function, attribute or list of
attributes for describing/parameterizing a harvest (organism
removal/hunting) strategy (see poems::population_simulator
).
mortality
Simulator-dependent function, attribute or list of
attributes to describe/parameterize a spatio-temporal mortality
strategy (see poems::population_simulator
).
dispersal
Simulator-dependent function, attribute or list of
attributes for describing/parameterizing the dispersal (migration)
strategy utilized (see disease_simulator
).
dispersal_stages
Array 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_k
Simulator-dependent attribute for
describing/parameterizing dispersal dependent on source population
abundance divided by carrying capacity (see
disease_simulator
).
dispersal_target_k
Simulator-dependent attribute for
describing/parameterizing dispersal dependent on target population
carrying capacity (see disease_simulator
).
dispersal_target_n
Simulator-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_k
Simulator-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_threshold
Abundance threshold (that needs to be exceeded) for each population to persist.
seasons
Number of seasons in a year (default 1.) The first one is always treated as the breeding season.
simulation_order
A vector of simulation process names in configured order of execution.
results_selection
List 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_aliases
A list of alternative alias names for model
attributes (form: alias = "attribute"
) to be used with the set
and get attributes methods.
template_model
Nested template model for fixed (non-sampled) attributes for shallow cloning.
sample_attributes
Vector of sample attribute names (only).
required_attributes
Vector of required attribute names (only), i.e. those needed to run a simulation.
error_messages
A vector of error messages encountered when setting model attributes.
warning_messages
A vector of warning messages encountered when setting model attributes.
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_aliases
A 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(), ...)
params
List 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)
params
Optional 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)
deep
Whether to make a deep clone.