Skip to content
Prev 163855 / 398506 Next

How to get Greenhouse-Geisser epsilons from anova?

Dear Mr. Daalgard.

thank you very much for your reply, it helped me to progress a bit.

The following works fine:
dd <- expand.grid(C = 1:7, B= c("r", "l"), A= c("c", "f"))
myma <- as.matrix(myma) #myma is a 12 by 28 list
mlmfit <- lm(myma~1)
mlmfit0 <- update(mlmfit, ~0)
anova(mlmfit, mlmfit0, X= ~C+B, M = ~A+C+B, idata = dd,  
test="Spherical"), which tests the main effect of A.
anova(mlmfit, mlmfit0, X= ~A+C,  M = ~A+C+B, idata = dd,  
test="Spherical"), which tests the main effect of B.


However, I can not figure out how this works for the other effects.
If I try:
anova(mlmfit, mlmfit0, X= ~A+B,  M = ~A+C+B, idata = dd,  test="Spherical")

I get:
Fehler in function (object, ..., test = c("Pillai", "Wilks", 
"Hotelling-Lawley",  :
        residuals have rank 1 < 4

I also don't know how I can calculate the various interactions..
My read is I should change the second argument mlmfit0, too, but I can't 
figure out how...

Do you know what to do?
Thank you very much!



Peter Dalgaard schrieb: