[R-sig-ME] Mean of random effects same as fixed effect?

Jens Åström jens.astrom at slu.se
Sun Jan 8 08:55:03 CET 2012


Hi all,

A couple of weeks ago I posted a question but got no answers. Here goes
a second attempt, now shorter and more general.


Are the following two model specifications interchangeable, or is there
a statistical reason for why it is not OK to express model 1 in the form
of model 2?

Model 1)
y=fixed.intercept+fixed.slope*x+random.intercept+random.slope*x

Model 2)
y=random.intercept*x+random.slope*x
fixed.intercept=mean(random.intercept)
fixed.slope=mean(random.slope)



The reasons for my asking is that I have trouble getting convergence
with model specification 1, when the random intercepts and random slopes
are correlated, but specifying it as model 2 seemed to work. This is me
trying to implement some standard mixed models in BUGS/JAGS. Original
post with complete working example is here:
http://markmail.org/message/vhqeq4j3kldttlt5



I'm happy for any comments, with or without BUGS/JAGS code.

/Jens Astrom




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