make_ipm {ipmr} | R Documentation |
Methods to implement an IPM
Description
The make_ipm.*
methods convert a proto_ipm
into a
set of discretized kernels and population vectors. Methods have different
requirements, so be sure to read the parameter documentation.
vignette('ipmr-introduction', 'ipmr')
a more complete introduction.
Usage
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...
)
## S3 method for class 'simple_di_det'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
normalize_pop_size = TRUE,
iteration_direction = "right"
)
## S3 method for class 'simple_di_stoch_kern'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NULL,
normalize_pop_size = TRUE,
report_progress = FALSE,
iteration_direction = "right"
)
## S3 method for class 'simple_di_stoch_param'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NULL,
normalize_pop_size = TRUE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'general_di_det'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
normalize_pop_size = TRUE,
iteration_direction = "right"
)
## S3 method for class 'general_di_stoch_kern'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NULL,
normalize_pop_size = TRUE,
report_progress = FALSE,
iteration_direction = "right"
)
## S3 method for class 'general_di_stoch_param'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NULL,
normalize_pop_size = TRUE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'simple_dd_det'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'simple_dd_stoch_kern'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NA_character_,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'simple_dd_stoch_param'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NA_character_,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'general_dd_det'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'general_dd_stoch_kern'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NA_character_,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
## S3 method for class 'general_dd_stoch_param'
make_ipm(
proto_ipm,
return_main_env = TRUE,
return_all_envs = FALSE,
usr_funs = list(),
...,
domain_list = NULL,
iterate = TRUE,
iterations = 50,
kernel_seq = NA_character_,
normalize_pop_size = FALSE,
report_progress = FALSE,
iteration_direction = "right",
return_sub_kernels = FALSE
)
Arguments
proto_ipm |
A proto_ipm. This should be the
output of |
return_main_env |
A logical indicating whether to return the main environment
for the model. This environment contains the integration mesh, weights, and
other potentially useful variables for subsequent analyses. Default is
|
return_all_envs |
A logical indicating whether to return the environments that
the kernel expressions are evaluated in. These may be useful for some analyses,
such as regression-level sensitivity/elasticity analyses, but can also rapidly
increase memory consumption for models with many kernels (e.g. ones with
parameter set indices that have many levels, or any |
usr_funs |
An optional list of user-specified functions that are passed
on to the model building process. This can help make vital rate expressions
more concise and expressive. Names in this list should exactly match the names
of the function calls in the |
... |
Other arguments passed to methods. |
domain_list |
An optional list of new domain information to implement the IPM with. |
iterate |
A logical indicating whether or not iterate the model before exiting or just return the sub-kernels. Only applies to density-independent, deterministic models and density-independent, stochastic kernel re-sampled models. |
iterations |
If |
normalize_pop_size |
A logical indicating whether to re-scale the population
vector to sum to 1 before each iteration. Default is |
iteration_direction |
Either |
kernel_seq |
For |
report_progress |
A logical indicating whether or not to periodically
report progress for a stochastic simulation. Does not apply to deterministic
methods. Default is |
return_sub_kernels |
Only applies to density dependent and parameter
resampled models. If |
Value
The make_ipm.*
methods will always return a list of length 5
containing the following components:
sub_kernels: a list of arrays specified in
define_kernel
.env_list: a list containing the evaluation environments of kernel. This will contain the
main_env
object ifreturn_main_env = TRUE
. It will also contain the sub-kernels evaluation environments ifreturn_all_envs = TRUE
.env_seq: a character vector with length
iterations
of kernel indices indicating the order in which kernels are to be/were resampled OR a matrix with as many columns as stochastic parameters andn_iterations
rows.pop_state: population vectors stored as a list of arrays. The first dimension of each array corresponds to the state variable distribution, and the second dimension corresponds to time steps.
proto_ipm: the
proto_ipm
object used to implement the model.
In addition to the list class, each object will have a class comprised of the
arguments from init_ipm
plus 'ipm'
pasted together with
underscores. This is to facilitate print
, plot
, and
lambda
methods. For example, a init_ipm("general", "di", "det")
model will have the class 'general_di_det_ipm'
once it has been
implemented using make_ipm
.