icc: Compute the ICC from a lmer (package lme4) model

Description Usage Arguments Details Value Author(s) Examples

View source: R/icc.R

Description

This function will extract the variances from a mixed model and output the value of the ICC

Usage

1
icc(model)

Arguments

model

a lmer model

Details

Recall that the equation for the ICC is var(school)/[var(school)+ var(person)]. This forumla extracts the necessary variances from the mixed model and computes it.

Value

the ICC

Author(s)

Dustin Fife

Examples

1
2
3
4
data(alcuse)
require(lme4)
model = lmer(ALCUSE~1|ID, data=alcuse)
icc(model)

dustinfife/fifer documentation built on Oct. 31, 2020, 3:36 p.m.