residuals in lmer
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! --Jake
Best,
Renaud
--
Dr Renaud Lancelot, v??t??rinaire
C/0 Ambassade de France - SCAC
BP 834 Antananarivo 101 - Madagascar
e-mail: renaud.lancelot at cirad.fr
tel.: +261 32 40 165 53 (cell)
+261 20 22 665 36 ext. 225 (work)
+261 20 22 494 37 (home)