[R] calculating effect size for aov or lme

Greg Trafton trafton at mac.com
Sat Aug 30 03:43:51 CEST 2008


Hi, All.  I'd like to calculate effect sizes for aov or lme and seem  
to have a bit of problems.  partial-eta squared would be my first  
choice, but I'm open to suggestions.

Here is the aov version:

 > fit.aov <- (aov(correct ~ cond * palette + Error(subject),  
data=data))
 > summary(fit.aov)

Error: subject
           Df  Sum Sq Mean Sq F value Pr(>F)
Residuals 15 0.17326 0.01155

Error: Within
              Df  Sum Sq Mean Sq F value    Pr(>F)
cond          1 0.32890 0.32890  52.047 4.906e-09 ***
palette       1 0.21971 0.21971  34.768 4.447e-07 ***
cond:palette  1 0.50387 0.50387  79.735 1.594e-11 ***
Residuals    45 0.28437 0.00632
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

and here is the lme version:

 > fm1 <- lme(correct ~ cond * palette, random=~1 | subject, data=data)
 > anova(fm1)
              numDF denDF  F-value p-value
(Intercept)      1    45 4031.042  <.0001
cond             1    45   52.047  <.0001
palette          1    45   34.768  <.0001
cond:palette     1    45   79.735  <.0001

Thanks so much!
Greg



More information about the R-help mailing list