Skip to content

Confidence Interval of random effect variances in lmer

2 messages · tommy gaillard, Ben Bolker

#
tommy gaillard <tommy.gaillard40 at ...> writes:
In principle you should be able to get confidence intervals
with the development version of lme4: see the installation
notes at the *bottom* of https://github.com/lme4/lme4/ ,
e.g.

library(lme4)
fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
pp <- profile(fm1)
confint(pp)

  However, you are quite likely to have difficulty
with this because one of your random effects is estimated as
zero.

You might try MCMCglmm:
library(MCMCglmm)
mm <- MCMCglmm(Reaction ~ Days,
         random = ~us(Days):Subject, data=sleepstudy)
summary(mm)

  the 'G-structure' part of the output gives you lower and upper
bounds on the 95% credible interval.