Returns a single-row tibble of model-level diagnostics following the
generics::glance() convention. Standard information-criterion columns
(logLik, AIC, BIC, nobs) are included alongside FIMS-specific
diagnostics (max_gradient, marginal_nll, total_nll, converged,
terminal_ssb).
Usage
# S3 method for class 'FIMSFit'
glance(x, ...)Arguments
- x
A
FIMSFitobject returned fromfit_fims().- ...
Unused; present for S3 method compatibility.
Value
A tibble::tibble() with one row and the following columns:
logLikMarginal log-likelihood at the MLE (
-opt$objective).AICAkaike information criterion (marginal, fixed effects only).
BICBayesian information criterion (marginal, fixed effects only).
nobsTotal number of data observations (rows with both an observed and an expected value in
get_estimates()).npar_fixedNumber of fixed-effect parameters.
npar_randomNumber of random-effect parameters.
marginal_nllMarginal negative log-likelihood (
opt$objective);NAif the model was not optimized.total_nllTotal (joint) negative log-likelihood from the TMB report (
report$jnll).max_gradientMaximum absolute gradient at the MLE. Values below 0.001 are generally considered well-converged.
convergedLogical;
TRUEwhenopt$convergence == 0andmax_gradient < 0.001.terminal_ssbSpawning stock biomass at the terminal year, extracted from the TMB report. Returns a list-column when multiple populations are present.
fims_versionThe version of FIMS used to fit the model.
runtime_secsTotal wall-clock time of the fit in seconds.
Information criteria
AIC and BIC are computed from the marginal log-likelihood (i.e. after
integrating out random effects), using the number of fixed-effect
parameters as \(k\):
$$AIC = 2k - 2 \ell_m$$
$$BIC = k \log(n) - 2 \ell_m$$
where \(\ell_m\) is the marginal log-likelihood and \(n\) is the total
number of data observations. These values will be NA when
optimize = FALSE was passed to fit_fims().
Examples
if (FALSE) { # \dontrun{
data("data_big")
data_4_model <- FIMSFrame(data_big)
fit <- create_default_parameters(
configurations = create_default_configurations(data = data_4_model),
data = data_4_model
) |>
initialize_fims(data = data_4_model) |>
fit_fims(optimize = TRUE)
glance(fit)
# Compare sensitivity runs in one table
dplyr::bind_rows(
glance(age_only_fit) |> dplyr::mutate(model = "age_only"),
glance(length_only_fit) |> dplyr::mutate(model = "length_only")
)
} # }
