[R] lme4 package: Fitted values and residuals
Frank Johannes
fjohannes at fastmail.fm
Thu Nov 16 12:37:06 CET 2006
Dear all,
I have three concerns:
1)
I am running models with the lme4 package. I cannot find a way to pull
out a vector of the fitted values and the residuals. Does anybody know
how to do it?
2)
How can I nest a random effect variable into a "two-level" fixed effect
variable?
3)
Suppose I have the following model:
y = a + b|c + d + error,
where 'a' is a fixed effect, 'c' is a random effect nested with the
random effect 'b', and 'd' is a non-nested random effect.
Suppose I obtain parameter estimates for all of the predictor variables.
Now, I would like to calculate a fitted value, 'yhat', from only the
parameter estimates for 'a' and 'b|c'. Can this be done in lme4. That
is; can I pull out all of the requisite elements from the output to
calculate 'yhat'?
Thanks for your help,
Frank.
--
More information about the R-help
mailing list