disease_dispersal {epizootic} | R Documentation |
Modular functions for the disease simulator for performing dispersal of segment (stage by compartment) abundance at a specified time step via dispersal rates provided. Dispersal can be handled identically for all stages and compartments, or can be handled differently by stage, compartment, or both.
disease_dispersal(
replicates,
time_steps,
populations,
demographic_stochasticity,
dispersal,
dispersal_type,
dispersal_source_n_k = NULL,
dispersal_target_k = NULL,
dispersal_target_n = NULL,
dispersal_target_n_k = NULL,
stages = NULL,
compartments = NULL,
simulator
)
replicates |
Number of replicate simulation runs. |
time_steps |
Number of simulation time steps. |
populations |
Number of populations. |
demographic_stochasticity |
Boolean for optionally choosing demographic stochasticity for the transformation. |
dispersal |
Must be a list. Either a list of matrices of dispersal rates
between populations (source columns to target rows) or a list of data
frames of non-zero dispersal rates and indices for constructing a compact
dispersal matrix, and optionally a list of lists of data frames showing
changing rates over time (as per class
returns the post-dispersal abundance matrix |
dispersal_type |
Must be "pooled", "stages", "compartments", or "segments". This indicates whether dispersal should be handled differently by stage and/or compartment. |
dispersal_source_n_k |
Dispersal proportion (p) density dependence via source population abundance divided by carrying capacity (n/k), where p is reduced via a linear slope (defined by two list items) from n/k <= cutoff (p = 0) to n/k >= threshold or vice versa. |
dispersal_target_k |
Dispersal rate (r) density dependence via target population carrying capacity (k), where r is reduced via a linear slope (through the origin) when k <= threshold. |
dispersal_target_n |
Dispersal rate (r) density dependence via target population abundance (n), where r is reduced via a linear slope (defined by two list items) from n >= threshold to n <= cutoff (r = 0) or visa-versa. |
dispersal_target_n_k |
Dispersal rate (r) density dependence via target population abundance divided by carrying capacity (n/k), where r is reduced via a linear slope (defined by two list items) from n/k >= threshold to n/k <= cutoff (r = 0) or vice versa. |
stages |
Number of life cycle stages. |
compartments |
Number of disease compartments. |
simulator |
|
Dispersal function: function(r, tm, carrying_capacity,
segment_abundance)
, where:
r
Simulation replicate.
tm
Simulation time step.
carrying_capacity
Array of carrying capacity values for each population at time step.
segment_abundance
Matrix of abundance for each stage by compartment (rows) and population (columns) at time step.
returns
New stage abundance matrix with dispersal applied.