Skip to contents

Resolves missing parameters, priors, map, and bounds from package defaults, builds the transient RTMB objective, and caches it for the current session. Normal workflows can omit this call because sbt_optimise() and sbt_mcmc() build automatically.

Usage

sbt_build_object(fit, silent = TRUE)

Arguments

fit

An sbt_fit() object.

silent

Passed to RTMB::MakeADFun().

Value

The configured, built sbt_fit. Resolved parameters, priors, map, bounds, and active parameter names are retained in the portable fit; the RTMB objective is cached only for the current R session.

Examples

if (FALSE) { # \dontrun{
fit <- sbt_fit(sbt_example_data())
fit <- sbt_build_object(fit)
length(sbt_obj(fit)$par)
} # }