[R] REML with random slopes and random intercepts giving strange results
S.Pickett at exeter.ac.uk
Tue Aug 15 17:34:13 CEST 2006
I have been using REML to derive intercepts and coeficients for each
individual in a growth study. So the code is
m2 <- lmer(change.wt ~ newwt+(newwt|id), data = grow)
Calling coef(model.lmer) gives a matrix with this information which is
what I want. However, as a test I looked at each individual on its own and
used a simple linear regression to obtain the same information, then I
compared the results. It looks like the REML method doesnt seem to
approximate the two parameters as well as using the simple linear
regression on each individual separately, as judged by looking at graphs.
Indeed, why do the results differ at all?
Excuse my naivety if this is a silly question.
Thanks to everyone for replying to my previous questions, very much
Centre For Ecology and Conservation
University of Exeter in Cornwall
More information about the R-help