Compute the per-capita growth rate for a given model. Can handle stochastic and deterministic models, and has the option to discard burn in for stochastic models.
lambda(ipm, ...)
# S3 method for class 'simple_di_det_ipm'
lambda(ipm, type_lambda = "last", log = FALSE, ...)
# S3 method for class 'simple_di_stoch_kern_ipm'
lambda(ipm, type_lambda = "stochastic", burn_in = 0.1, log = NULL, ...)
# S3 method for class 'simple_di_stoch_param_ipm'
lambda(ipm, type_lambda = "stochastic", burn_in = 0.1, log = NULL, ...)
# S3 method for class 'general_di_det_ipm'
lambda(ipm, type_lambda = "last", log = FALSE, ...)
# S3 method for class 'general_di_stoch_kern_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
# S3 method for class 'general_di_stoch_param_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
# S3 method for class 'simple_dd_det_ipm'
lambda(ipm, type_lambda = "all", ..., log = FALSE)
# S3 method for class 'simple_dd_stoch_kern_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
# S3 method for class 'simple_dd_stoch_param_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
# S3 method for class 'general_dd_det_ipm'
lambda(ipm, type_lambda = "last", ..., log = FALSE)
# S3 method for class 'general_dd_stoch_kern_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
# S3 method for class 'general_dd_stoch_param_ipm'
lambda(ipm, ..., type_lambda = "stochastic", burn_in = 0.1, log = NULL)
An object returned by make_ipm()
.
other arguments passed to methods.
Either 'all'
, 'last'
,
or 'stochastic'
. 'all'
returns a vector of lambda values for each time step of the simulation (equal
in length to the iterations
argument of make_ipm()
).
'last'
returns the lambda value for the final timestep.
'stochastic'
returns a single value, which by default is
mean(log(lambda(ipm, type_lambda = "all")))
, with the proportion of
burn_in
iterations removed from the beginning of the simulation. Set
log
to FALSE
to get lambda
on the linear scale for
stochastic models (i.e. exp(mean(log(lambdas)))
).
Return lambda on the log scale? This is TRUE
by default for
stochastic models, and FALSE
for deterministic models.
The proportion of iterations to discard. Default is 0.1 (i.e. first 10% of iterations in the simulation).
When type_lambda = "all"
, an array. Rows correspond to time
steps, and columns correspond to parameter sets (if any). For other types,
a numeric vector.