| nl_icc | R Documentation |
Extracts variance components from a multilevel nl_fit object and
computes intraclass correlation coefficients (ICCs) for each grouping
level plus the residual.
The ICC for grouping factor g is defined as:
ICC_g = \frac{\sigma^2_g}{\sum_j \sigma^2_j + \sigma^2_\epsilon}
nl_icc(object, include_residual = TRUE)
object |
An |
include_residual |
Logical; if |
A named numeric vector of ICCs, one per grouping factor (named
ICC_<groupname>) plus Residual for the residual variance
(when include_residual = TRUE). All values sum to 1.
nl_fit
## Not run:
fit <- nl_fit(
data = mydata,
y = "math_score",
x = "SES",
cluster = c("id", "schid"),
df = 4
)
nl_icc(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.