[R-sig-ME] Expected correlation in a mixed model

S Ellison S.Ellison at lgc.co.uk
Mon Nov 22 12:50:34 CET 2010


Forgive the possibly numb-brained question, but is there a reason why
the correlation between random effects coefficients in lmer should come
out as identically 1.0 in a model of the form

lmer(x ~ a + (a|b) )

?

An example:
set.seed(403)
require(lme4)
run <- gl(4, 15)
conc <- rep(rep(c(0,0.1, 0.2, 0.4, 1.0), 3), 4)
boxplot(conc~run)
offset=0.2*as.numeric(run)
od <- offset+conc+rnorm(60, 0, 0.2)
plot(conc, od)

(lmer1<-lmer(od~conc+(conc|run)))
VarCorr(lmer1)


S Ellison
LGC

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}




More information about the R-sig-mixed-models mailing list