varcomp: Calculate SE and CI of variance components for 'lmer' or...

View source: R/varcomp.R

varcompR Documentation

Calculate SE and CI of variance components for lmer or lme model

Description

This function calculates SE and CI of variance components for lmer or lme model.

Usage

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

Arguments

model

Model object returned by lmer or lme.

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)

predictmeans documentation built on Oct. 20, 2023, 5:07 p.m.