Returns the session-only RTMB objective associated with an sbt_fit().
Strict reads build and cache this objective, so the default access is cheap
and does not reconstruct model state a second time. Set fresh = TRUE only
for operations, such as sampling, that may mutate the objective; the fresh
object is deliberately not placed in the shared runtime cache.
Value
An RTMB objective restored at the saved optimum when available, or at the configured starting values for an unoptimized fit.
See also
Other fit workflow:
check_mcmc(),
check_mle(),
sbt_add_bounds(),
sbt_add_map(),
sbt_add_msy(),
sbt_add_parameters(),
sbt_add_priors(),
sbt_build_object(),
sbt_example_fit(),
sbt_fit(),
sbt_fit_compatibility(),
sbt_fit_io,
sbt_fit_rebuild(),
sbt_fit_report(),
sbt_fit_validate(),
sbt_fit_validation(),
sbt_mcmc(),
sbt_optimise()
Examples
if (FALSE) { # \dontrun{
fit <- sbt_example_fit()
object <- sbt_obj(fit)
length(object$par)
} # }
