[R] F tests for random effect models

From: Jacques VESLOT <jacques.veslot_at_cirad.fr>
Date: Thu 27 Oct 2005 - 16:22:23 EST

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.) :

[1] "Lignee" "Pollinisateur" "Rendement"

[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 :

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 Thu Oct 27 16:32:39 2005

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