Package 'dynamAedes'

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

Help Index


Summaries of mosquito abundance

Description

Summaries of mosquito abundance at each life stage and sub-stage for each day.

Usage

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"
)

Arguments

input_sim

matrix. dynamAedes compressed or uncompressed output 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: c(0.25,0.5,0.75).

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).

Value

Returns a data frame or a raster with the summary of mosquito abundance at each life stage for each day.

Author(s)

Matteo Marcantonio [email protected], Daniele Da Re [email protected]


Reference list for Aedes stages and substages

Description

Reference files to match simulation output matrices with Aedes stages and substages as modelled in dynamAedes. The list contains:

Usage

data(AedeslifeHistoryList)

Format

A list of two matrices

Details

  • speciesheet: description of each substage for each species

  • codesheet: reference coding to match substages to simulation output


Estimate of of mosquito dispersal

Description

Estimates of dispersal (in km^2) for the simulated mosquito population when scale = "lc".

Usage

dici(
  input_sim = NULL,
  eval_date = NULL,
  breaks = c(0.25, 0.5, 0.75),
  space = FALSE
)

Arguments

input_sim

matrix. dynamAedes.m compressed output matrix (compressed=TRUE).

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: c(0.25,0.5,0.75).

space

See below for more details.

Value

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.

Author(s)

Matteo Marcantonio [email protected], Daniele Da Re [email protected]


Life cycle simulation of Aedes mosquitoes

Description

Function to simulate population dynamics of Aedes mosquitoes

Usage

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
)

Arguments

species

character. Select what species to model: "aegypti", "albopictus", "japonicus", "koreicus". Default species = "aegypti".

intro.eggs

positive integer. number of introduced eggs, default intro.eggs = 0.

intro.deggs

positive integer. number of introduced diapause eggs, default intro.deggs = 100.

intro.adults

positive integer. number of introduced adults, default intro.adults = 0.

intro.juveniles

positive integer. number of introduced juveniles, default intro.juveniles = 0.

scale

character. Define the model spatial scale: punctual/weather station "ws", local "lc", or regional "rg". Active and passive dispersal is enabled only for scale = "lc". Default scale = "ws".

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 lhwv = 1.

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 date.

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 NA; then it will be derived using the number of columns in temps.matrix.

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 scale = "lc", defines the matrix containing the distances (in meters) between grid cells intersecting the road network for the mosquito passive dispersal process. colnames(road.dist.matrix) must correspond to the same cell in temps.matrix (may be an issue if the coordinates used for creating road.dist.matrix have been subset to match road segments).

avgpdisp

optional. when scale = "lc", define the average car trip distance (in meters) for the mosquito passive dispersal process. The value can be set by the users (positive numeric), or the estimates made by Pasaoglu et al. 2012) for the following European countries: France "fra", Germany "deu", Italy "ita", Poland "pol", Spain "esp" and the United Kingdom "uk". The average passive dispersal distance must be smaller than the maximum distance in road.dist.matrix.

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 scale = "lc", defines the minimal distance for the active dispersal kernel and should match the spatial resolution of temps.matrix to avoid inconsistencies. Default cellsize = 250.

maxadisp

positive integer. When scale = "lc", defines the maximum daily active dispersal, default maxadisp = 600.

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 FALSE, if seeding=TRUE a fixed seed is applied for result reproducibility.

Value

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.

Author(s)

Matteo Marcantonio [email protected], Daniele Da Re [email protected]

See Also

Beta regression functions were taken from the R package aomisc, which may be available at https://github.com/OnofriAndreaPG/aomisc.

Examples

## 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

Description

S4 class representing the output of dynamAedes.m

Slots

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.


Number of invaded cells

Description

Compute a summary of the number of invaded cells over model iterations

Usage

icci(input_sim = NA, eval_date = NULL, breaks = c(0.25, 0.5, 0.75))

Arguments

input_sim

matrix. dynamAedes.m compressed output matrix (compressed=TRUE).

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: c(0.25,0.5,0.75).

Value

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).

Author(s)

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.

Description

Max method for dynamAedesClass Provides the max number of days with at least one propagule in the system (any stage) along iterations.

Usage

## S4 method for signature 'dynamAedesClass'
max(x, na.rm = FALSE)

Arguments

x

An object of class dynamAedesClass.

na.rm

logic.

Value

An integer.

Examples

## 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.

Description

Min method for dynamAedesClass Provides the min number of days with at least one propagule in the system (any stage) along iterations.

Usage

## S4 method for signature 'dynamAedesClass'
min(x, na.rm = FALSE)

Arguments

x

An object of class dynamAedesClass.

na.rm

logic.

Value

An integer.

Examples

## Not run: 
min(sim)

## End(Not run)

Proportion of successful introductions

Description

Compute the proportion of "successful" introductions.

Usage

psi(input_sim = NULL, eval_date = NULL)

Arguments

input_sim

matrix. dynamAedes.m compressed output matrix (compressed=TRUE).

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.

Value

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.

Author(s)

Matteo Marcantonio [email protected], Daniele Da Re [email protected]


Probability of successful introduction (spatial)

Description

Compute the proportion of successful introductions per each cell of the grid.

Usage

psi_sp(input_sim = NULL, eval_date = NULL, n.clusters = 1)

Arguments

input_sim

matrix. dynamAedes.m compressed output matrix (compressed=TRUE).

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.

Value

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.

Author(s)

Matteo Marcantonio [email protected], Daniele Da Re [email protected]


Temporal downscaling of entomological surveillance observations

Description

Temporal downscaling of entomological surveillance observations

Usage

spreader(
  mydf = NULL,
  date.field = NULL,
  value.field = NULL,
  counter.field = NULL,
  seed = 123
)

Arguments

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 seed = 123.

Value

Returns a data.frame with the "adjusted value", i.e. the observation spread over the period of activity of the trap

Author(s)

Daniele Da Re [email protected], Giovanni Marini [email protected]


Summary method for dynamAedesClass Provides a summary of simulations based on the dynamAedesClass.

Description

Summary method for dynamAedesClass Provides a summary of simulations based on the dynamAedesClass.

Usage

## S4 method for signature 'dynamAedesClass'
summary(object)

Arguments

object

An object of class dynamAedesClass.

Value

A character vector with the summary details of the simulation.

Examples

## Not run: 
summary(sim)

## End(Not run)