Title: | A Unified Mechanistic Model for the Population Dynamics of Invasive Aedes Mosquitoes |
---|---|
Description: | Generalised model for population dynamics of invasive Aedes mosquitoes. Rationale and model structure are described here: Da Re et al. (2021) <doi:10.1016/j.ecoinf.2020.101180> and Da Re et al. (2022) <doi:10.1101/2021.12.21.473628>. |
Authors: | Matteo Marcantonio [aut, cre], Daniele Da Re [aut] |
Maintainer: | Matteo Marcantonio <[email protected]> |
License: | GPL(>=2) |
Version: | 2.2.9 |
Built: | 2024-11-07 05:31:01 UTC |
Source: | https://github.com/mattmar/dynamaedes |
Summaries of mosquito abundance at each life stage and sub-stage for each day.
adci( input_sim = NULL, stage = NULL, sub_stage = NULL, breaks = c(0.25, 0.5, 0.75), eval_date = NULL, n.clusters = 1, type = "N" )
adci( input_sim = NULL, stage = NULL, sub_stage = NULL, breaks = c(0.25, 0.5, 0.75), eval_date = NULL, n.clusters = 1, type = "N" )
input_sim |
matrix. |
stage |
character. "Eggs", "Juveniles", "Adults", or "DiapauseEggs" or any shorter attempt longer than 3 letters. |
sub_stage |
character. For uncompressed outputs only, defines the substage of interest. Please see cheat-sheet table. |
breaks |
numeric vector. Quantile breaks, default the first, the second and the third quartile: |
eval_date |
positive integer. Define the day to evaluate from the first day of introduction. Note that this can be particularly demanding in the case of spatial outputs. |
n.clusters |
integer. Number of parallel processes. |
type |
character. The type of output. Set "O" to force overall time-only summary over spatial. Default is "N" (normal). |
Returns a data frame or a raster with the summary of mosquito abundance at each life stage for each day.
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Reference files to match simulation output matrices with Aedes stages and substages as modelled in dynamAedes. The list contains:
data(AedeslifeHistoryList)
data(AedeslifeHistoryList)
A list of two matrices
speciesheet: description of each substage for each species
codesheet: reference coding to match substages to simulation output
Estimates of dispersal (in km^2) for the simulated mosquito population when scale = "lc"
.
dici( input_sim = NULL, eval_date = NULL, breaks = c(0.25, 0.5, 0.75), space = FALSE )
dici( input_sim = NULL, eval_date = NULL, breaks = c(0.25, 0.5, 0.75), space = FALSE )
input_sim |
matrix. |
eval_date |
numeric. Define the day of evaluation; it refers to the column number of the input temperature matrix. |
breaks |
numeric vector. Quantile breaks, default interquartile range: |
space |
See below for more details. |
if space=FALSE then it returns a dataframe with quantiles of the distribution of dispersal distances; if space=TRUE (experimental) then it returns the invaded cells on the last day of model simulations for each of the iterations.
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Function to simulate population dynamics of Aedes mosquitoes
dynamAedes.m( species = NULL, intro.eggs = 0, intro.deggs = 0, intro.adults = 0, intro.juveniles = 0, scale = NULL, intro.cells = NULL, jhwv = NULL, temps.matrix = NULL, startd = 1, endd = NA, cells.coords = NULL, coords.proj4 = NA, lat = NA, long = NA, road.dist.matrix = NULL, avgpdisp = NA, pDispersal = TRUE, iter = 1, n.clusters = 1, cluster.type = "PSOCK", compressed.output = TRUE, suffix = NA, cellsize = 250, maxadisp = 600, dispbins = 10, verbose = 0, seeding = FALSE )
dynamAedes.m( species = NULL, intro.eggs = 0, intro.deggs = 0, intro.adults = 0, intro.juveniles = 0, scale = NULL, intro.cells = NULL, jhwv = NULL, temps.matrix = NULL, startd = 1, endd = NA, cells.coords = NULL, coords.proj4 = NA, lat = NA, long = NA, road.dist.matrix = NULL, avgpdisp = NA, pDispersal = TRUE, iter = 1, n.clusters = 1, cluster.type = "PSOCK", compressed.output = TRUE, suffix = NA, cellsize = 250, maxadisp = 600, dispbins = 10, verbose = 0, seeding = FALSE )
species |
character. Select what species to model: |
intro.eggs |
positive integer. number of introduced eggs, default |
intro.deggs |
positive integer. number of introduced diapause eggs, default |
intro.adults |
positive integer. number of introduced adults, default |
intro.juveniles |
positive integer. number of introduced juveniles, default |
scale |
character. Define the model spatial scale: punctual/weather station "ws", local "lc", or regional "rg". Active and passive dispersal is enabled only for |
intro.cells |
positive integer. One or more cells (id) where to introduce the population at local ("lc") scale. If intro.cells=NULL, then a random cell is used for introduction; If intro.cells is a vector of cell ids then a cell is drawn at random from the vector (with repetition) for introduction in each model iteration. |
jhwv |
positive integer. Juvenile-habitat water volume, define the volume (L) of water habitat presents in each spatial unit (parametrised with data retrieved from doi:10.1111/1365-2664.12620). Default |
temps.matrix |
matrix. A matrix of daily (average) temperatures (in degrees Celsius degree x 1000) used to fit the life cycle rates. This matrix must be organised with the daily temperature observations as columns and the geographic position of the i-grid cell as rows. Importantly, the first column must match |
startd |
Character date (ISO format "%Y-%m-%d"). Date of start of simulations. |
endd |
Character date (ISO format "%Y-%m-%d"). Date of end of simulation. It can be |
cells.coords |
matrix. A matrix reporting the spatial coordinates of the temperature observations. |
coords.proj4 |
string. Proj4 string of cell coordinates used for the calculation of photoperiod. |
lat |
numeric. Latitude value of the area of interested used to derive the photoperiod (and thus the diapause eggs allocation function). |
long |
numeric. Longitude value of the area of interested used to derive the photoperiod (and thus the diapause eggs allocation function) |
road.dist.matrix |
matrix. when |
avgpdisp |
optional. when |
pDispersal |
boolean. if TRUE (default) then the model considers passive dispersal. |
iter |
positive integer. Define the number of model iterations. |
n.clusters |
positive integer. Defines the number of parallel processes. |
cluster.type |
character. Defines the type of cluster, default "PSOCK". |
compressed.output |
logical. Default TRUE, if FALSE provide abundance for each model's subcompartiment; if FALSE abundances are summed per compartment. |
suffix |
character. Model output suffix for output RDS. |
cellsize |
positive integer. When |
maxadisp |
positive integer. When |
dispbins |
positive integer. When scale = "lc", defines the resolution of the active dispersal kernel, default dispbins = 10. |
verbose |
integer. if 1 then an overview of population dynamics is printed in the console, if 2 more information on population dynamics are printed out. Default is 0 (silent). |
seeding |
logical, default |
Matrix or a list of matrices containing, for each iteration, the number of individuals in each life stage per day (and for each grid cell of the study area if scale="lc" or "rg"). If the argument compressed.output=FALSE (default TRUE), the model returns the daily number of individuals in each life stage sub-compartment.
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Beta regression functions were taken from the R package aomisc
, which may be available at https://github.com/OnofriAndreaPG/aomisc.
## Run dynamAedes at local scale for 5 days # Make a toy temperature time series w <- matrix(seq(20,25,length.out=5),ncol=5)*1000 # Run the model simout <- dynamAedes.m( species="koreicus", scale="ws", intro.eggs=10, jhwv=2, temps.matrix=w, startd="2021-06-21", endd="2021-06-25", lat=42, long=8, n.clusters=1, iter=1, compressed.output=TRUE, verbose=FALSE)
## Run dynamAedes at local scale for 5 days # Make a toy temperature time series w <- matrix(seq(20,25,length.out=5),ncol=5)*1000 # Run the model simout <- dynamAedes.m( species="koreicus", scale="ws", intro.eggs=10, jhwv=2, temps.matrix=w, startd="2021-06-21", endd="2021-06-25", lat=42, long=8, n.clusters=1, iter=1, compressed.output=TRUE, verbose=FALSE)
S4 class representing the output of dynamAedes.m
species
Character. The simulated species.
scale
Character. The scale of the simulation.
start_date
Character. The introduction date.
end_date
Character. The end date of the simulation.
n_iterations
Numeric. The number of iterations.
stage_intro
Character. The introduced mosquito stage.
n_intro
Numeric. The number of propagules introduced.
coordinates
Matrix. The coordinates of each cell.
compressed_output
Logical. If output is at stage or substage level.
jhwv
Numeric. The volume of water in the system.
Compute a summary of the number of invaded cells over model iterations
icci(input_sim = NA, eval_date = NULL, breaks = c(0.25, 0.5, 0.75))
icci(input_sim = NA, eval_date = NULL, breaks = c(0.25, 0.5, 0.75))
input_sim |
matrix. |
eval_date |
numeric. Define the day of evaluation; it refers to the column number of the input temperature matrix. |
breaks |
numeric vector. Quantile breaks, default interquartile range: |
icci
returns quantiles of the distribution of the invaded cell number for the specified. The output should be interpreted according to model spatial scale (i.e. scale='rg'
or scale='lc'
give different interpretation).
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Max method for dynamAedesClass Provides the max number of days with at least one propagule in the system (any stage) along iterations.
## S4 method for signature 'dynamAedesClass' max(x, na.rm = FALSE)
## S4 method for signature 'dynamAedesClass' max(x, na.rm = FALSE)
x |
An object of class |
na.rm |
logic. |
An integer.
## Not run: max(sim) ## End(Not run)
## Not run: max(sim) ## End(Not run)
Min method for dynamAedesClass Provides the min number of days with at least one propagule in the system (any stage) along iterations.
## S4 method for signature 'dynamAedesClass' min(x, na.rm = FALSE)
## S4 method for signature 'dynamAedesClass' min(x, na.rm = FALSE)
x |
An object of class |
na.rm |
logic. |
An integer.
## Not run: min(sim) ## End(Not run)
## Not run: min(sim) ## End(Not run)
Compute the proportion of "successful" introductions.
psi(input_sim = NULL, eval_date = NULL)
psi(input_sim = NULL, eval_date = NULL)
input_sim |
matrix. |
eval_date |
positive integer. define the day(s) to calculate the proportion of successful introductions which should match the column number of the temperature matrix used to inform the model. |
psi
returns the proportion of model iterations that resulted in a viable mosquito population (defined as: iterations with at least one individual alive in any life stage) at a given date.
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Compute the proportion of successful introductions per each cell of the grid.
psi_sp(input_sim = NULL, eval_date = NULL, n.clusters = 1)
psi_sp(input_sim = NULL, eval_date = NULL, n.clusters = 1)
input_sim |
matrix. |
eval_date |
positive integer. Define the day(s) to calculate the proportion of successful introductions which should match the column number of the temperature matrix used to inform the model. |
n.clusters |
positive integer. Define the number of parallel processes. |
psi_sp
returns a raster with the proportion of model iterations that resulted in a viable mosquito population at a given date for a given life stage in each cell of the grid.
Matteo Marcantonio [email protected], Daniele Da Re [email protected]
Temporal downscaling of entomological surveillance observations
spreader( mydf = NULL, date.field = NULL, value.field = NULL, counter.field = NULL, seed = 123 )
spreader( mydf = NULL, date.field = NULL, value.field = NULL, counter.field = NULL, seed = 123 )
mydf |
A data.frame. |
date.field |
character, name of field containing dates. |
value.field |
integer, name of field containing the number of individuals sampled. |
counter.field |
integer, name of the field containing the number of days/weeks between each sampling. This is optional, if NULL then the function will compute the value assuming the trap was active during the whole period between two consecutive samplings. |
seed |
integer, define the seed for the binomial draws, default |
Returns a data.frame with the "adjusted value", i.e. the observation spread over the period of activity of the trap
Daniele Da Re [email protected], Giovanni Marini [email protected]
Summary method for dynamAedesClass Provides a summary of simulations based on the dynamAedesClass.
## S4 method for signature 'dynamAedesClass' summary(object)
## S4 method for signature 'dynamAedesClass' summary(object)
object |
An object of class |
A character vector with the summary details of the simulation.
## Not run: summary(sim) ## End(Not run)
## Not run: summary(sim) ## End(Not run)