Runs optimization on the TMB model using stats::nlminb.
If specified, takes additional Newton steps and calculates standard deviations.
Internal function called by fit_wham.
fit_tmb(
model,
n.newton = 3,
do.sdrep = TRUE,
do.check = FALSE,
save.sdrep = FALSE,
use.optim = FALSE,
opt.control = NULL
)Output from TMB::MakeADFun.
Integer, number of additional Newton steps after optimization. Default = 3.
T/F, calculate standard deviations of model parameters? See TMB::sdreport. Default = TRUE.
T/F, check if model parameters are identifiable? Runs internal check_estimability, originally provided by the TMBhelper package. Default = TRUE.
T/F, save the full TMB::sdreport object? If FALSE, only save summary.sdreport) to reduce model object file size. Default = FALSE.
T/F, use stats::optim instead of stats::nlminb? Default = FALSE.
list of control parameters to pass to optimizer. For nlminb default = list(iter.max = 1000, eval.max = 1000). For optim default = list(maxit=1000).
model, appends the following:
model$optOutput from stats::nlminb
model$dateSystem date
model$dirCurrent working directory
model$repmodel$report(model$env$last.par.best)
model$TMB_versionVersion of TMB installed
model$parListList of parameters, model$env$parList(x = model$opt$par, par = model$env$last.par.best)
model$final_gradientFinal gradient, model$gr(model$opt$par)
model$sdrepEstimated standard deviations for model parameters, TMB::sdreport or summary.sdreport)