Re: [R] residuals in lmer

From: Jacob Michaelson <jjmichael_at_comcast.net>
Date: Mon 25 Apr 2005 - 22:56:36 EST

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@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@cirad.fr
> tel.: +261 32 40 165 53 (cell)
> +261 20 22 665 36 ext. 225 (work)
> +261 20 22 494 37 (home)
>



R-help@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 Received on Mon Apr 25 23:01:48 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:25 EST