Functions to initialize and define IPM kernels
Adds a new kernel to the proto_ipm
structure.
define_kernel( proto_ipm, name, formula, family, ..., data_list = list(), states, has_hier_effs = FALSE, levels_hier_effs = list(), levels_ages = list(), evict_cor = FALSE, evict_fun = NULL, integrate = TRUE )
proto_ipm |
The name of the model. |
name |
The name of the new kernel. |
formula |
A bare expression specifying the form of the kernel. |
family |
The type of kernel. Options are |
... |
A set of named expressions that correspond
to vital rates in |
data_list |
A list of named values that correspond to constants in the formula
and vital rate expressions in |
states |
A list with character vector containing the names of each state variable used in the kernel. |
has_hier_effs |
A logical indicating whether or not the kernel and/or its
underlying vital rates are structured with hierarchical effects. See the
introduction vignette for this feature for more details ( |
levels_hier_effs |
A named list with vectors corresponding to the various levels the hierarchical variable can take. The names should match the suffixes used in the vital rate expressions. |
levels_ages |
If |
evict_cor |
A logical indicating whether an eviction correction should be applied to the kernel. |
evict_fun |
If |
integrate |
For |
Different classes of IPMs may have many or only a few kernels. Each
one requires its own call to define_kernel
, though there are some exceptions,
namely for kernels derived from hierarchical models (e.g. vital rate models
fit across plots and years).
A much more complete overview of how to generate kernels is provided in
vignette("ipmr-introduction", "ipmr")
.
A proto_ipm
.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.