Calculate intraclass correlation
This is a simple function for calculating intraclass correlation. It uses lmer
to run the formula described here: https://en.wikipedia.org/wiki/Intraclass_correlation
icc(x, group)
x
: Response variablegroup
: GroupReturns estimate of intraclass correlation.