Define a list of control parameters.
ecostate_control(
nlminb_loops = 1,
newton_loops = 0,
eval.max = 1000,
iter.max = 1000,
getsd = TRUE,
silent = getOption("ecostate.silent", TRUE),
trace = getOption("ecostate.trace", 0),
verbose = getOption("ecostate.verbose", FALSE),
profile = c("logF_ti", "log_winf_z", "s50_z", "srate_z"),
random = c("epsilon_ti", "alpha_ti", "nu_ti", "phi_tg2"),
tmb_par = NULL,
map = NULL,
getJointPrecision = FALSE,
integration_method = c("ABM", "RK4", "ode23", "rk4", "lsoda"),
process_error = c("epsilon", "alpha"),
n_steps = 10,
F_type = c("integrated", "averaged"),
derived_quantities = c("h_g2", "B_ti", "B0_i"),
scale_solver = c("joint", "simple"),
inverse_method = c("Standard", "Penrose_moore"),
tmbad.sparse_hessian_compress = 1,
start_tau = 0.001
)
An S3 object of class "ecostate_control" that specifies detailed model settings, allowing user specification while also specifying default values
Integer number of times to call stats::nlminb()
.
Integer number of Newton steps to do after running
stats::nlminb()
.
Maximum number of evaluations of the objective function
allowed. Passed to control
in stats::nlminb()
.
Maximum number of iterations allowed. Passed to control
in
stats::nlminb()
.
Boolean indicating whether to call TMB::sdreport()
Disable terminal output for inner optimizer?
Parameter values are printed every trace
iteration
for the outer optimizer. Passed to
control
in stats::nlminb()
.
Output additional messages about model steps during fitting?
parameters that are profiled across,
passed to MakeADFun
parameters that are treated as random effects,
passed to MakeADFun
list of parameters for starting values, with shape identical
to tinyVAST(...)$internal$parlist
list of mapping values, passed to RTMB::MakeADFun
whether to get the joint precision matrix. Passed
to sdreport
.
What numerical integration method to use. "ABM"
uses a native-R versions of Adam-Bashford, "RK4"
uses a native-R
version of Runge-Kutta-4, and "ode23"
uses a native-R
version of adaptive Runge-Kutta-23,
where all are adapted from pracma
functions.
"rk4"
and lsoda
use those methods
from deSolve::ode
as implemented by RTMBode::ode
Whether to include process error as a continuous rate
(i.e., an "innovation" parameterization, process_error="epsilon"
)
or as a discrete difference between expected
and predicted biomass (i.e., a "state-space" parameterization),
process_error="alpha"
The
former is more interpretable, whereas the latter is much more computationally
efficient.
number of steps used in the ODE solver for biomass dynamics
whether to integrate catches along with biomass ("integrated"
)
or calculate catches from the Baranov catch equation applied to average
biomass ("averaged"
)
character-vector listing objects to ADREPORT
Whether to solve for ecotrophic efficiency EE given biomass B
(scale_solver="simple"
) or solve for a combination of EE and B values
whether to use pseudoinverse or standard inverse
passed to TMB::config()
, and enabling
an experimental feature to save memory when first computing the inner
Hessian matrix. Using tmbad.sparse_hessian_compress=1
seems
to have no effect on the MLE (although users should probably confirm this),
and hugely reduces memory use in both small
and large models. Using tmbad.sparse_hessian_compress=1
seems
to hugely speed up the model-fitting with a large model but results in a small
decrease in speed for model-fitting with a small model.
Starting value for the standard deviation of process errors