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)

Arguments

x

Response variable

group

Group

Value

Returns estimate of intraclass correlation.