is_conv_to_asymptotic | R Documentation |
Checks for convergence to asymptotic dynamics numerically and
visually. is_conv_to_asymptotic
checks whether
lambda[iterations - 1]
equals lambda[iterations]
within the
specified tolerance, tolerance
. conv_plot
plots the time series of
lambda
(or log(lambda)
). For stochastic models, a cumulative mean of
log(lambda) is used to check for convergence.
is_conv_to_asymptotic(ipm, tolerance, burn_in) ## S3 method for class 'ipmr_ipm' is_conv_to_asymptotic(ipm, tolerance = 1e-06, burn_in = 0.1) conv_plot(ipm, iterations, log, show_stable, burn_in, ...) ## S3 method for class 'ipmr_ipm' conv_plot( ipm, iterations = NULL, log = NULL, show_stable = TRUE, burn_in = 0.1, ... )
ipm |
An object returned by |
tolerance |
The tolerance for convergence in lambda or, in the case of stochastic models, the cumulative mean of log(lambda). |
burn_in |
The proportion of iterations to discard. Default is 0.1 (i.e. first 10% of iterations in the simulation). Ignored for deterministic models. |
iterations |
The range of iterations to plot |
log |
A logical indicating whether to log transform |
show_stable |
A logical indicating whether or not to draw a line indicating
population stability at |
... |
Further arguments to |
Plotting can be controlled by passing additional graphing parameters
to ...
.
is_conv_to_asymptotic
: Either TRUE
or FALSE
.
conv_plot
: codeipm invisibly.
data(gen_di_det_ex) proto <- gen_di_det_ex$proto_ipm %>% define_pop_state(n_ht = runif(200), n_b = 200000) ipm <- make_ipm(proto) is_conv_to_asymptotic(ipm, tolerance = 1e-5) conv_plot(ipm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.