Skip to contents

Inspects the fit's per-row family vector and flags the one configuration that makes the link_residual = "auto" path incoherent: within-trait family mixing, which errors. Ordinal traits do not warn: the liability residual (1 for ordinal_probit(), pi^2/3 for ordinal_logit()) enters the total covariance only through "auto", so "auto" is the correct setting and link_residual = "none" would drop it and give unit-tier correlations of exactly +/-1.

Usage

check_auto_residual(fit)

Arguments

fit

A fit returned by gllvmTMB().

Value

Invisibly, a list with components status (one of "ok", "warn", or "err" – though the "err" path is unreachable from a successful return because cli::cli_abort halts) and messages (a character vector of human-readable findings; empty when status = "ok").

Side effects

  • "err" path: cli::cli_abort is fired and the function does not return.

  • "warn" path: reserved; no configuration currently reaches it.

  • "ok" path: silent.