Skip to contents

Missing configuration is resolved automatically. Repeated calls start from the RTMB objective's env$last.par.best; each pass begins at the best state retained by the preceding pass.

Usage

sbt_optimise(
  fit,
  n_passes = 2L,
  control = NULL,
  check = TRUE,
  check_args = list()
)

Arguments

fit

An sbt_fit() object.

n_passes

Positive number of sequential optimizer passes.

control

Optional nlminb control list. The stored control is used when omitted.

check

Run check_mle() after optimization.

check_args

Named arguments passed to check_mle().

Value

The optimised sbt_fit, containing the accepted nlminb result, complete fitted parameter state, diagnostics, and, when check = TRUE, a payload-bound MLE validation record.

Examples

if (FALSE) { # \dontrun{
fit <- sbt_fit(sbt_example_data())
fit <- sbt_optimise(
  fit,
  n_passes = 2L,
  control = list(eval.max = 10000L, iter.max = 10000L)
)
fit
} # }