residuals in lmer
Jacob Michaelson wrote:
On Apr 24, 2005, at 11:42 PM, Renaud Lancelot wrote:
Jacob Michaelson a ??crit :
Does anyone know how to extract residuals in lmer? Here's the error I get:
>
crop.lme=lmer(response~variety*irrigation*pesticide+(1|rep)+(1|rep: pesticide)+(1|rep:pesticide:irrigation), crop.data)
> qqnorm(crop.lme)
Error in qqnorm.default(crop.lme) : y is empty or has only NAs
> resid(crop.lme)
NULL Thanks! --Jake
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
I'm afraid they're not (yet) available. At least, you can write a small function to compute response residuals, using predictions from the fixed and random parts, built with model.matrix(), fixef() and ranef(). Let me know if you need an example (I'm not available this morning).
Sure, an example would be very helpful, thanks!
Version 0.95-6 of the lme4 package has an lmer method for resid and for residuals.