[R-sig-ME] How to update random effects without updating fixed effects and covariance

Ali Nasiri Amini alinasiriamini at gmail.com
Sat Feb 26 20:05:01 CET 2011

Let assume that we have two datasets d1 and d2. I fitted a mixed model
on dataset d1 and estimated fixed effects, random effects, and
covariance matrix of random effects. Now I want to use the fixed
effect and covariance matrices derived from d1 and estimate
only random effects for d2. To be more specific let us consider the
sleepstudy example that is given in the book.

fm <- lmer(Reaction ~ 1 + Days + (1 + Days|Subject), sleepstudy, REML
= 0, verbose = TRUE)

Now consider that I have a new data set from 2 new subjects, i.e a
data frame sleepstudy2. I am interested to estimate only random
effects corresponding to these new subjects assuming fixed effect and
covariance matrix estimated from the original dataset. I think this should
be just a few lines of code but I could not figure it out.

Ali Amini

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