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 gllvmTMB_multi object.

For binomial fits: "auto" (default) adds the link-specific implicit residual to \((\boldsymbol\Sigma_W)_{tt}\); "none" returns ICC on the latent+unique-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 unique component \(\mathbf S\) when unique() is in the formula. If either level has only latent() and no unique(), the corresponding advisory message fires and the ICC is computed against the latent-only 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().