icc: Calculate ICC from an object of class lmerMod or glmerMod

Description Usage Arguments Value Examples

View source: R/icc.R

Description

Calculate ICC from an object of class lmerMod or glmerMod

Usage

1
icc(model, bci = FALSE, seed, R = 50, ...)

Arguments

model

Object of class either lmerMod or glmerMod (fitted with family = "gaussian").

bci

Logical, indicating whether to return a bootstrap confidence interval for the ICC. The default is FALSE.

seed

Random number seed to make the bootrstrapping reproducible.

R

The number of bootstrap replicates. The default is 50.

...

Further arguments passed to boot::boot.ci() for the bootstrap confidence interval.

Value

Object of class iccvpc containing the following elements:

Examples

1
2
3
4
5
6
require(lme4)
# fit random intercept model, with fixed effect for Days
fm1 <- lmer(Reaction ~ Days + (1 | Subject), sleepstudy)
summary(fm1)
icc(fm1)
icc(fm1, bci = TRUE, seed = 12345)

remlapmot/iccvpc documentation built on May 15, 2020, 12:17 a.m.