Re: [R] F tests for random effect models

From: Jacques VESLOT <jacques.veslot_at_cirad.fr>
Date: Fri 28 Oct 2005 - 15:22:44 EST

Thanks a lot, but :

 > anova(lmer(Rendement ~ (1 | Pollinisateur) + (1 | Lignee) + (1 | Pollinisateur : Lignee),

        data = mca2))
Analysis of Variance Table
Erreur dans ok[, -nc] : nombre de dimensions incorrect

It looks like working with at least one fixed effect but not with random effect models.

Jacques VESLOT

Doran, Harold a écrit :
> I think what you're looking for is in anova()
>
>

>>fm1 <- lmer(dv ~ IV ...)
>>anova(fm1)

>
>
>
>
> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Jacques VESLOT
> Sent: Thursday, October 27, 2005 2:22 AM
> To: R-help@stat.math.ethz.ch
> Subject: [R] F tests for random effect models
>
> Dear R-users,
>
> My question is how to get right F tests for random effects in random
> effect models (I hope this question has not been answered too many times
> yet - I didn't find an answer in rhelp archives).
>
> My data are in mca2 (enc.) :
>
> names(mca2)
> [1] "Lignee" "Pollinisateur" "Rendement"
>
> dim(mca2)
> [1] 100 3
>
> replications(Rendement ~ Lignee * Pollinisateur, data = mca2)

> Lignee Pollinisateur Lignee:Pollinisateur
> 20 10 2
>
> Of course, summary(aov(Rendement ~ Pollinisateur * Lignee, data = mca2))
> gives wrong tests of random effects. But, summary(aov1 <- aov(Rendement

> ~ Error(Pollinisateur * Lignee), data = mca2)) gives no test at all, and
> I have to do it like this :
>
> tab1 <- matrix(unlist(summary(aov1)), nc=5, byrow=T)[,1:3]
>
> Femp <- c(tab1[1:3, 3]/tab1[c(3,3,4), 3])
>
> names(Femp) <- c("Pollinisateur", "Lignee", "Interaction")
>
> 1 - pf(Femp, tab1[1:3,1], tab1[c(3,3,4),1])
>
> With "lme4" package (I did'nt succeed in writing a working formula with
> lme from "nlme" package), I can "see" standard deviations of random
> effects (but don't know how to find them) with :
>
> library(lme4)
> summary(lmer(Rendement ~ (1 |Pollinisateur) + (1 | Lignee) + (1 |
> Pollinisateur:Lignee), data=mca2))
>
> but I can't get F tests.
>
> Thanks in advance.
>
> Best regards,
>
> Jacques VESLOT
>
>
>
>
>

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 Fri Oct 28 15:35:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:51 EST