Runs optimization on the TMB model using
stats::nlminb. If specified, takes additional
Newton steps and calculates standard deviations. Internal function called by
fit_rema. Source code and documentation modified from
wham::fit_tmb.
Arguments
- model
Output from
TMB::MakeADFun.- n.newton
Integer, number of additional Newton steps after optimization. Default =
0.- do.sdrep
T/F, calculate standard deviations of model parameters? See
TMB::sdreport. Default =TRUE.- do.check
T/F, check if model parameters are identifiable? Runs internal
check_estimability, originally provided by https://github.com/kaskr/TMB_contrib_R/TMBhelper. Default =TRUE.- save.sdrep
T/F, save the full
TMB::sdreportobject? IfFALSE, only savesummary.sdreport)to reduce model object file size. Default =FALSE.
Value
model, appends the following:
model$optOutput from
stats::nlminbmodel$dateSystem date
model$dirCurrent working directory
model$repmodel$report()
model$TMB_versionVersion of TMB installed
model$parListList of parameters,
model$env$parList()model$final_gradientFinal gradient,
model$gr()model$sdrepEstimated standard deviations for model parameters,
TMB::sdreportorsummary.sdreport)
See also
fit_rema, TMBhelper::check_estimability
