Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

init_ipm

Initialize an IPM


Description

This is always the first step in constructing an IPM with ipmr. All you need for this is to know what type of IPM you want to construct - the rest comes later with define_kernel, make_ipm, and associated helper functions. See Details for complete overview of each option.

Usage

init_ipm(sim_gen, di_dd, det_stoch, kern_param = NULL, has_age = FALSE)

Arguments

sim_gen

Either "simple" or "general".

di_dd

Either "di" or "dd".

det_stoch

Either "det" or "stoch". If this is "det", then kern_param is ignored. If "stoch", then kern_param must be specified.

kern_param

If det_stoch = "stoch", then this should be either "kern" or "param".

has_age

A logical indicating whether the model has age structure. Default is FALSE

Details

Combinations of simple or general, dd or di, and det or stoch are generated to create 1 of 12 unique IPM classes.

Within stoch model types, there are two additional options: "kern" or "param". These distinguish between models that use kernel resampling vs those that use parameter resampling (sensu Metcalf et al. 2015). Below are quick definitions. More detailed explanations can be found in the vignettes("ipmr-introduction", package = 'ipmr').

  • sim_gen

    • simple: an IPM with a single continuous state variable that does not include any discrete stages. Simple IPMs can still be stochastic and/or density dependent.

    • general: an IPM with more than one continuous state variable and/or a model that includes discrete stages.

  • di_dd

    • dd: used to denote a density dependent IPM.

    • di: used to denote a density independent IPM.

  • det_stoch

    • det: used to denote a deterministic IPM.

    • stoch: used to denote a stochastic IPM. Stochasticity can be implemented in two ways in ipmr: "kern" resampling, and "param" resampling.

  • kern_param - if using det, this should be omitted. If using stoch, then one of the following:

    • kern: used to denote an IPM that uses kernel resampling. Briefly, these models build all of the iteration kernels ahead of time and then choose one at random or in a user-specified order as they move from iteration to iteration. The user-specified population vector is multiplied by the chosen kernel and the result is multiplied by the next kernel for the desired number of iterations.

    • param: used to denote parameter resampling. This samples distributions for each parameter based on user-specified functions supplied to define_env_state(). This will be a bit slower than "kern" resampling because kernels need to be reconstructed from new parameters at every time step.

Value

An object with classes "proto_ipm" and a combination of sim_gen, di_dd, det_stoch, and possibly kern_param. If has_age = TRUE, then an "age_x_size" class is also added.

References

Metcalf et al. (2015). Statistical modelling of annual variation for inference on stochastic population dynamics using Integral Projection Models. Methods in Ecology and Evolution, 6: 1007-1017


ipmr

Fits Integral Projection Models Using an Expression Based Framework

v0.0.1
MIT + file LICENSE
Authors
Sam Levin [aut, cre] (<https://orcid.org/0000-0002-3289-9925>), Aldo Compagnoni [aut], Dylan Childs [aut], Sanne Evers [aut], Roberto Salguero-Gomez [aut], Tiffany Knight [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.