Define a list of control parameters.
Usage
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
)
Arguments
- nlminb_loops
Integer number of times to call
stats::nlminb()
.- newton_loops
Integer number of Newton steps to do after running
stats::nlminb()
.- eval.max
Maximum number of evaluations of the objective function allowed. Passed to
control
instats::nlminb()
.- iter.max
Maximum number of iterations allowed. Passed to
control
instats::nlminb()
.- getsd
Boolean indicating whether to call
TMB::sdreport()
- silent
Disable terminal output for inner optimizer?
- trace
Parameter values are printed every
trace
iteration for the outer optimizer. Passed tocontrol
instats::nlminb()
.- verbose
Output additional messages about model steps during fitting?
- profile
parameters that are profiled across, passed to
MakeADFun
- random
parameters that are treated as random effects, passed to
MakeADFun
- tmb_par
list of parameters for starting values, with shape identical to
tinyVAST(...)$internal$parlist
- map
list of mapping values, passed to RTMB::MakeADFun
- getJointPrecision
whether to get the joint precision matrix. Passed to
sdreport
.- integration_method
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 frompracma
functions."rk4"
andlsoda
use those methods fromdeSolve::ode
as implemented byRTMBode::ode
- process_error
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.- n_steps
number of steps used in the ODE solver for biomass dynamics
- F_type
whether to integrate catches along with biomass (
"integrated"
) or calculate catches from the Baranov catch equation applied to average biomass ("averaged"
)- derived_quantities
character-vector listing objects to ADREPORT
- scale_solver
Whether to solve for ecotrophic efficiency EE given biomass B (
scale_solver="simple"
) or solve for a combination of EE and B values- inverse_method
whether to use pseudoinverse or standard inverse
- tmbad.sparse_hessian_compress
passed to
TMB::config()
, and enabling an experimental feature to save memory when first computing the inner Hessian matrix. Usingtmbad.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. Usingtmbad.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.- start_tau
Starting value for the standard deviation of process errors