Skip to content

aov or lme effect size calculation

4 messages · Greg Trafton, Doran, Harold

#
(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
#
Greg

You haven't really explained what your problem is. If it is conceptual
(i.e., how do I do it) this is not really the right place for in-depth
statistical advice, but it is often given. OTOH, if your problem is
computational, please explain what that is? For example, maybe you know
how to compute eta-squared, but you want to extract the variance
component and you can't figure that out.

Without more info, it is hard to help. Now, with that said, with lme (or
mixed models) you have multiple variance components, so how would you go
about computing eta-squared anyhow?
#
Sorry about that.  My problem is computational, not statistical and  
exactly as you say:  I don't quite know how to get the correct  
variance component from either aov or lme.  the way to compute partial  
eta squared is:

partial-eta-squared = SS(effect) / (SS(effect) + SS(error))

AOV gives Sum Squares for both effects and the interaction, but lme  
doesn't even give that in default format.

thanks,
greg
On Sep 2, 2008, at 11:43 AM, Doran, Harold wrote:

            
#
Greg

Upgrade your packages to the supported versions (lme4 and Matrix), and
use lmer and not lme.

### Example
Analysis of Variance Table
     Df Sum Sq Mean Sq F value
Days  1  30032   30032  45.854

Your method for eta-squared with a mixed model is another story,
however.