Skip to content
Prev 1671 / 20628 Next

Summarizing the fitted model takes more RAM than

On Mon, Dec 15, 2008 at 10:16 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
One would need to define such a method carefully.  If the factors
defining random effects form a strictly nested sequence then there is
an interpretation of level.  If you do not have a strictly nested
sequence then I can only make sense of having all the random effects
defining fitted values (which is what the method for fitted returns
now) or having none of them.  The second is using the fixed-effects
coefficients only.
I don't know if fitted(lm(distance ~ age, Orthodont)) produces the
desired result. Removing the random effects from the prediction is not
always the same as removing the random effects from the fit.  I would
get the fitted values for the fixed effects only using

as.vector(model.matrix(fm1) %*% fixef(fm1))