Learn R Programming

lmerTest (version 2.0-6)

rand: Performs likelihood ratio test on random effects of linear mixed effects model.

Description

Returns a data frame with values of Chi square statistics and corresponding p-values of likelihood ratio tests.

Usage

rand(model, ...)

Arguments

model
linear mixed effects model (lmer object).
...
other potential arguments.

Value

  • Produces a data frame with tests for the random terms being non-significant.

Details

The columns of the data are: Chisq: The value of the chi square statistics Chi Df: The degrees of freedom for the test p.value: The p-value of the likelihood ratio test for the effect

See Also

step, lsmeans, difflsmeans

Examples

Run this code
#import lme4 package and lmerTest package
library(lmerTest)

#lmer model with correlation between intercept and slopes
#in the random part
m <- lmer(Preference ~ sens2+Homesize+(1+sens2|Consumer), data=carrots)

# table with  p-values for the random effects
rand(m)

Run the code above in your browser using DataLab