Skip to contents

Inspects the fit's per-row family vector and flags two configurations that make the link_residual = "auto" path incoherent: within-trait family mixing (errors) and ordinal-probit traits (warns; the latent residual is already standardised at 1, so adding 1 again over-counts).

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: cli::cli_warn is fired before the function returns the list invisibly.

  • "ok" path: silent.