SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
se.ranef: when constant, when variable? [ Reply ]
By: Michael Kubovy on 2013-03-21 10:04
[forum:39249]
library(lme4)
library(arm)
library(MEMSS)
##############################
The following 5 examples produce uniform se.ranef
##############################
data(Dyestuff)
fit1 <- lmer(Yield ~ 1 + (1|Batch), Dyestuff)
se.ranef(fit1)
##############################
data(Penicillin)
fm1 <- lmer(diameter ~ (1|plate) + (1|sample), Penicillin)
se.ranef(fm1)
##############################
data(sleepstudy)
fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
se.ranef(fm1)
# se.ranef(fm2) # code not written
##############################
data(Alfalfa)
m1 <- lmer(Yield ~ Variety * Date + (1|Block), Alfalfa)
se.ranef(m1)
##############################
data(Assay)
m1 <- lmer(logDens ~ sample * dilut + (1|Block) + (1|Block:sample) +
(1|Block:dilut), Assay)
m2 <- lmer(logDens ~ sample + dilut + (1|Block) + (1|Block:sample) +
(1|Block:dilut), Assay)
m3 <- lmer(logDens ~ sample + dilut + (1|Block) + (1|Block:sample),
Assay)
se.ranef(m1)
se.ranef(m2)
se.ranef(m3)
##############################
The following produces variable se.ranef
##############################
data(Gasoline)
m1 <- lmer(yield ~ endpoint + (1|Sample), Gasoline)
m2 <- lmer(yield ~ endpoint + (endpoint|Sample), Gasoline)
Gasoline$endptC <- with(Gasoline, endpoint - mean(endpoint))
m3 <- lmer(yield ~ endpoint + (endptC|Sample), Gasoline)
se.ranef(m1)
se.ranef(m2)
se.ranef(m3)
##############################
Why? When? References?
##############################

Thanks to:
Vienna University of Economics and Business Powered By FusionForge