Description Usage Arguments Examples
This function computes the intraclass correlation coefficients for one or several models.
1 2 3 4 5 6 7 8 |
... |
One or more objects of class |
var_names |
By default, the function extracts the name(s) of the dependent variable(s) from the objects. If you provide a vector with new names here, these new names will be used. |
digits_icc |
How many digits should be printed for the ICC (only works with |
digits_percent |
How many digits should be printed for the percentage (only works with |
print |
Logical value indicating whether the table should be formatted according to APA guidelines. |
1 2 3 4 5 6 7 8 9 10 | library(lme4)
# Estimate a multilevel model
mod1 <- lmer(Reaction ~ 1 + (1 | Subject), sleepstudy)
mod2 <- lmer(Reaction ~ 1 + Days + (1 | Subject), sleepstudy)
# Computing the ICC for the first model
compute_icc(mod1, digits_icc = 4, digits_percent = 2, print = TRUE)
# Compute ICCs for both models
compute_icc(mod1, mod2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.