icc | R Documentation |
Calculates the intraclass correlation coefficient (ICC) fitting a linear mixed-effects model using lmer.
icc(x, PV = FALSE, group, data, weights = NULL, ...)
x |
a string vector specifying variable names (within |
PV |
a logical value indicating if the variables in |
group |
a string specifying the variable name (within |
data |
an optional data frame containing the variables named in
|
weights |
an optional vector of ‘prior weights’ to be used
in the fitting process. Should be |
... |
Arguments passed on to
|
a numeric value or a list.
# ICC of one variable
icc(x = "Math1",group = "GROUP", weights = repdata$wt, data = repdata)
# ICC of more than one variable
icc(x = c("Math1","Math2","Math3","Math4","Math5","SES"),
group = "GROUP", weights = repdata$wt, data = repdata)
# ICC of PVs
icc(x = c("Math1","Math2","Math3","Math4","Math5"), PV = TRUE,
group = "GROUP", weights = repdata$wt, data = repdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.