ICC {reghelper} | R Documentation |
Intra-class correlation.
Description
ICC
calculates the intra-class correlation (ICC) from a fitted
hierarchical linear model using the 'nlme' or 'lme4' packages.
Usage
ICC(model, ...)
## S3 method for class 'lme'
ICC(model, ...)
## S3 method for class 'merMod'
ICC(model, ...)
Arguments
model |
A fitted linear model of type 'lme' (nlme) or 'merMod' (lme4; linear, generalized, or nonlinear). |
... |
Not currently implemented; used to ensure consistency with S3 generic. |
Details
The ICC is the proportion of variance that is between-person variance. For more information, see Hoyt & Kenny (2013).
Value
The intra-class correlation of the model.
Methods (by class)
-
ICC(lme)
: Intra-class correlation for lme (nlme). -
ICC(merMod)
: Intra-class correlation for lmer (lme4).
Examples
# iris data, showing use with lme()
if (require(nlme, quietly=TRUE)) {
model <- lme(Sepal.Width ~ 1, random=~1|Species, data=iris)
ICC(model) # .49 of variance is between-subjects
}
# iris data, showing use with lmer()
if (require(lme4, quietly=TRUE)) {
model <- lmer(Sepal.Width ~ 1 + (1|Species), data=iris)
ICC(model) # .49 of variance is between-subjects
}
[Package reghelper version 1.1.2 Index]