$$\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().- link_residual
For non-Gaussian fits:
"auto"(default) adds each trait's family/link implicit residual to \((\boldsymbol\Sigma_W)_{tt}\);"none"omits those additions.
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 non-Gaussian fits the per-trait link-implicit residual is included
in the within-unit variance by default when link_residual = "auto"
(see extract_Sigma()); set
link_residual = "none" for the latent/Psi-implied scale only.
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().
