Skip to contents

[Experimental]

Usage

fit_diagnostics(object, ...)

Arguments

object

A fitted model object.

...

Reserved for future arguments.

Value

A data frame with metric and value columns and class "hs_fit_diagnostics".

Details

fit_diagnostics() returns a compact diagnostics table for an hsquared_fit object. It is an inspection helper over the current result payload: it does not refit the model, rerun validation checks, or promote an experimental bridge target to production support.

The method row names the objective that produced the fit. For target = "nongaussian" with marginal = "laplace", that value is "Laplace marginal likelihood": a Laplace approximation that integrates the intercept under a flat measure (REML-like V_A), not conventional Laplace-ML as in glmer / pedigreemm. logLik() is not comparable with glmer. The numerical method is unchanged.

Two rows share the word "boundary" but report unrelated things (hsquared#230):

  • at_boundary / at_boundary_condition derive from the fitted estimates: a variance component at or near zero, or an inadmissible negative estimate (hs_fit_boundary_class()). Emitted for the Gaussian animal-model / genomic / single-step routes that report one primary variance-share layout; the _condition row is dropped (not NA) when the fit is interior, since there is nothing extra to say.

  • search_boundary / search_boundary_condition mirror the non-Gaussian bridge's optimizer state: result$boundary (documented as fit$result$boundary in ?hs_control) reports whether HSquared.jl's single-variance Brent search stopped on the rail of its log-scale bracket (log(initial$sigma_a2) +/- 6, HSquared.jl#327) or, under restart_check = TRUE, whether the two-start gap fence fired; either way the estimate is a function of the search, not the data. Only fits whose result carries a boundary field (the non-Gaussian route) gain this pair; a Gaussian engine = "fit" fit gains neither row (not even NA). Unlike at_boundary_condition, search_boundary_condition is always emitted alongside a present search_boundary flag, reading "interior" rather than disappearing when the flag is FALSE – the search-bracket rail is a binary optimizer state with no benign-vs- inadmissible split to only sometimes report. In practice a search_boundary = TRUE fit is refused before it reaches an hsquared_fit object at all, so a returned fit's search_boundary is always FALSE; TRUE is reachable only on a hand-built result object.