[R-sig-ME] How to update random effects without updating fixed effects and covariance
Ali Nasiri Amini
alinasiriamini at gmail.com
Sat Feb 26 01:46:09 CET 2011
Hello,
Let assume that I have two dataset 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 that is 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 original dataset. I think this should
be just a few lines of code but I could figure it out.
thanks,
Ali Nasiri Amini
More information about the R-sig-mixed-models
mailing list