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

View source: R/icc.R View source: R/helper_estimates.R

iccR Documentation

Compute the ICC from a lmer (package lme4) model

Description

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

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

Usage

icc(model)

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.

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

the ICC

Author(s)

Dustin Fife

Examples

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

dustinfife/flexplot documentation built on Sept. 23, 2024, 9:01 p.m.