Skip to contents

A simple decision aid in the spirit of Zientek & Thompson (2007, doi:10.3758/BF03193163): given per-entry CIs on Lambda, flag the entries whose conf_level confidence interval does not exclude a user-supplied "null region" — a band around zero considered biologically negligible. Loadings flagged as unreliable = TRUE are the ones for which the data do not provide evidence that the species responds non-trivially to the axis.

Usage

flag_unreliable_loadings(
  fit,
  null_region = c(-0.1, 0.1),
  level = c("unit", "unit_obs"),
  method = "wald",
  conf_level = 0.95
)

Arguments

fit

A multivariate gllvmTMB() fit, or a data frame already produced by loading_ci().

null_region

Length-2 numeric, sorted ascending. The "negligible" band. Defaults to c(-0.1, 0.1).

level, method, conf_level

Forwarded to loading_ci() when fit is a fit object. Ignored when fit is already a loading_ci() data frame.

Value

The loading_ci() data frame with one extra logical column unreliable: TRUE if the CI overlaps null_region, FALSE if it lies entirely outside, NA for pinned entries.

Details

Pinned entries (set explicitly by lambda_constraint) are reported with unreliable = NA because no inference is being made about them.

See also

Examples

if (FALSE) { # \dontrun{
## Grounded in tests/testthat/test-loading-ci.R. flag_unreliable_loadings()
## accepts either a fit or a loading_ci() data frame directly.
fit <- gllvmTMB(
  value ~ 0 + trait + latent(0 + trait | site, d = 2L),
  data = df, family = stats::binomial(link = "probit")
)
## From a fit (computes per-entry Lambda CIs internally):
flag_unreliable_loadings(fit, null_region = c(-0.1, 0.1))
## Or pass a precomputed loading_ci() data frame:
ci <- loading_ci(fit, level = "unit")
flag_unreliable_loadings(ci, null_region = c(-0.1, 0.1))
} # }