varcomp {predictmeans}R Documentation

Calculate SE and CI of variance components for lmer, glmer, lme, glmmTMB model

Description

This function calculates SE and CI of variance components for lmer, glmer, lme, glmmTMB model.

Usage

varcomp(model, ci=TRUE, level=0.95) 

Arguments

model

Model object returned by lmer, glmer, lme, glmmTMB.

ci

a logical value to indicates wheather or not to simulate a confidence interval for lmer model, the default value is TRUE.

level

level of confidence of CI, the default value is 0.95.

Value

Variance components table.

Author(s)

Dongwen Luo, Siva Ganesh and John Koolaard

Examples

library(predictmeans)
Oats$nitro <- factor(Oats$nitro) 
fm <- lmer(yield ~ nitro*Variety+(1|Block/Variety), data=Oats)
## Not run: varcomp(fm)
fm1 <- lme(yield ~ nitro*Variety, random=~1|Block/Variety, data=Oats)
varcomp(fm1)

data(Orthodont, package="nlme")
mod <- lmer(distance ~ age + (age|Subject), data=Orthodont)
## Not run: varcomp(mod)
mod1 <- lme(distance ~ age, random=~age|Subject, data=Orthodont)
varcomp(mod1)

[Package predictmeans version 1.1.0 Index]