[R] aov or lme effect size calculation

Greg Trafton greg.trafton at nrl.navy.mil
Tue Sep 2 16:24:56 CEST 2008


(A repost of this request with a bit more detail)

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

I have a completely within design with 2 conditions (condition and  
palette).

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