Skip to contents

$$\mathrm{ICC}_t \;=\; \frac{(\boldsymbol\Sigma_B)_{tt}}{(\boldsymbol\Sigma_B)_{tt} + (\boldsymbol\Sigma_W)_{tt}}.$$

Usage

extract_ICC_site(fit, link_residual = c("auto", "none"))

Arguments

fit

A fit returned by gllvmTMB().

For binomial fits: "auto" (default) adds the link-specific implicit residual to \((\boldsymbol\Sigma_W)_{tt}\); "none" returns ICC on the latent/Psi-implied scale only.

Value

Numeric vector indexed by trait, or NULL if either Sigma_B or Sigma_W is unavailable.

Details

Calls extract_Sigma() internally for both levels with part = "total", so the diagonal of each \(\boldsymbol\Sigma\) includes the \(\boldsymbol\Psi\) component when it is present. Ordinary latent() includes \(\boldsymbol\Psi\) by default; if either level uses latent(..., unique = FALSE), the corresponding advisory message fires and the ICC is computed against the no-Psi diagonal.

For binomial fits the implicit link residual is included in the within-unit variance by default (matching the marginal latent-scale ICC convention); set link_residual = "none" to suppress.

See also

extract_proportions() for the canonical per-trait variance decomposition (B / W / phy / link-residual shares); extract_Sigma() for the unified covariance API; extract_communality().