Skip to contents

Returns a validation record stored by check_mle() or check_mcmc(). Records are bound to the fitted-model payload, scientific contract, acceptance settings, diagnostics, and (for MCMC) the retained posterior and sampler diagnostics. A mismatched record is rejected rather than reused.

Usage

sbt_fit_validation(
  fit,
  scope = c("mle", "mcmc"),
  verify = TRUE,
  require_pass = FALSE
)

Arguments

fit

An sbt_fit() object.

scope

Validation scope: "mle" or "mcmc".

verify

Recalculate the compact payload and diagnostics checksums. This never rebuilds an RTMB objective or reevaluates biological states.

require_pass

If TRUE, require the stored result to pass.

Value

The validation record, or NULL if the requested validation has not been completed. A record contains its scientific contract, validation scope, payload-bound identity, diagnostic checksum, logical passes result, completion time, and record identifier.

Examples

fit <- sbt_example_fit(rebuild = FALSE)
#> Warning: Dependency versions differ: RTMBdist, TMB
record <- sbt_fit_validation(
  fit,
  scope = "mle",
  require_pass = TRUE
)
record$passes
#> [1] TRUE