How to do RM ANOVA in SPSS:

1. Use file 3-level.xls -  a compact data file (one row per subject, one column per condition) but with only one row of column labels and no subject label column.   

 

2. Choose Analyze – GLM – repeated measures.  

 

3. Tell SPSS about the structure of these data, as part of launching the analysis – name your factors and say how many levels in each, then define them as conditions for the analysis:

 

type a factor name and its number of levels, click ADD

repeat until all factors are named

click DEFINE (brings up new window)

on left, see all your column labels

on right, see your declared data structure

send column labels over into data structure

clicking OK runs the analysis

 

4. Results: the first box echoes data structure so you can confirm you did it right:

 

Within-Subjects Factors

Measure: MEASURE_1 
 

FACTOR1

Dependent Variable 

1

 

COND1 

 

2

 

COND2 

 

3

 

COND3 

 

 

then the MANOVA results:

 

Multivariate Tests
 

Effect

 

Value

F

 Hypothesis df

Error df

   Sig. 

FACTOR1

 

 

 

 

 

 

Pillai's Trace

.615

2.401

2.000

3.000   .

238 

 

 

 

 

 

 

 

 

Wilks' Lambda

.385

2.401

2.000

3.000

.   .238 

 

 

 

 

 

 

 

 

Hotelling's Trace

1.601

2.401

2.000

3.000  

.238 

 

 

 

 

 

 

 

 

Roy's Largest Root

1.601

2.401

2.000

3.000  

.238 

 

aExact statistic

bDesign: InterceptWithin Subjects Design: FACTOR1

 

then a test of sphericity (basically useless, see below):

 

Mauchly's Test of Sphericity

Measure: MEASURE_1 
 

 

Mauchly's W

Approx. Chi-Square

df

Sig.

Epsilon

 

 

Within Subjects Effect

 

 

 

 

 

 

 

 

 

 

 

Greenhouse-Geisser

Huynh-Feldt

Lower-bound 

 

FACTOR1

 

 

 

 

 

 

 

.424

2.578

2

.273

.634

.795

.500 

 

Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is proportional to an identity matrix.

aMay be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests of Within-Subjects Effects table.

bDesign: InterceptWithin Subjects Design: FACTOR1

 

then the crucial bit: “tests of within-subjects effects”: without (“sphericity assumed”) vs. with correction (e.g “Huynh-Feldt”) = significant vs. not

 

Tests of Within-Subjects Effects

Measure: MEASURE_1 
 

Source

 

Type III Sum of Squares

df

Mean Square

F  

Sig. 

FACTOR1

 

 

 

 

 

 

Sphericity Assumed

928.533

2

464.267

4.725  

.044 

 

 

 

 

 

 

 

 

Greenhouse-Geisser

928.533

1.269

731.910

4.725  

.077 

 

 

 

 

 

 

 

 

Huynh-Feldt

928.533

1.590

583.935

4.725  

.060 

 

 

 

 

 

 

 

 

Lower-bound

928.533

1.000

928.533

4.725  

.095 

 

Error(FACTOR1)

 

 

 

 

 

 

Sphericity Assumed

786.133

8

98.267

 

 

 

 

 

 

 

 

 

 

Greenhouse-Geisser

786.133

5.075

154.916

 

 

 

 

 

 

 

 

 

 

Huynh-Feldt

786.133

6.361

123.596

 

 

 

 

 

 

 

 

 

 

Lower-bound

786.133

4.000

196.533

 

 

 

This same example is shown on a better-looking page from our statistics consultant at OAC.


What's up with the corrected df  vs. "sphericity assumed" results seen in this output?  See Max & Onghena’s (“Some issues in the statistical analysis of completely randomized and repeated measures designs for speech, language and hearing research”, JSLHR 42, 261-270, 1999) second critique of common practice in doing ANOVAs: the fact that researchers often ignore the problem of possible sphericity violations in repeated measures designs.

Sphericity

ANOVA assumes homogeneity of variance across conditions but is robust against violations of this assumption IF the data are uncorrelated.  Heterogeneity of variances in correlated data gives a positive bias in F tests (the critical value of the F is too low).  Sphericity means that data are uncorrelated; violations of sphericity require strict homogeneity of variance.  If there are only 2 levels of a factor, this problem of correlation doesn't arise; but if there are 3 or more levels you have to guard against it.

Option 1: Test for sphericity violations, i.e. test for correlations among variables.  SPSS provides Mauchly’s test of sphericity.  A resulting high chi-square value with a low p value is BAD, but if the data are uncorrelated you’re probably OK.  (However, Max & Onghena are dubious about the integrity of such tests in the first place, so even this isn’t clear.  But in any event note that the test doesn’t do anything as a result of a significant correlation, or tell you what to do to correct for the violation.  All the test does is tell you if there’s a problem (maybe)).

 

Option 2: Use MANOVA instead of ANOVA; a significant result from this test is valid; but this procedure is very conservative, i.e. unlikely to show significant differences. Use the Wilks’ Lambda result from the MANOVA table (though here all are same).

 

If you do this analysis on the Max & Onghena data, you’ll see that you do get the “MANOVA (Wilk’s lambda)” result in row 3 of their table.  Note that the difference is not even close to significant this way – this is a very conservative test!  Another potential catch to this analysis is that it requires more subjects than there are repeated measures (e.g. if you have 5 factors in your experiment then you need at least 6 subjects).

 

Option 3: use corrected df according to the degree of correlation in the data: 

Epsilon describes the extent of the sphericity violation, and epsilon-hat is the estimate of that parameter; when it < 1, it is used directly to adjust the df (e.g. if uncorrected df = 4 and epsilon = .75, then corrected df = 3).  The basic method is due to Box (1954), so is called the Box adjustment.  Huynh & Feldt (in the 70s) proposed a variation that is supposed to correct for some bias in calculating epsilon, and this is what we generally use. (Geisser and Greenhouse 1958 provided a formerly popular rule-of-thumb procedure which is overly conservative but simple. The most extreme, and computationally simplest, correction is the lower bound. But nowadays since a computer is doing all the work for us, there’s no reason to use a simpler but less exact method.)

 

To practice on your own: use the file MO-2.xls, which has 2 factors each with 3 levels.  It is already set up to have only one row of labels.  This is the second sample dataset used by Max&Onghena, and the results of the analysis can also be seen on the OAC demonstration page.  To analyze 2 factors, add the second factor after the first, then define them both.


Repeated from the earlier section on Repeated Measures: One reason students sometimes avoid Repeated Measures analyses is that there is no automatic option for post-hoc tests.  See Hays section 13.25 (p. 579-583) about using Scheffe and Tukey HSD procedures or Bonferroni t-tests for post-hoc testing of within-subject factors - including the use of the corrected df; see Winer p. 529 about using  a factorial 1-way ANOVA for testing simple effects (a comparison of levels of one factor to a single level of another factor).



last updated July 2011 by P. Keating

 

back to the UCLA Phonetics Lab statistics page

Back to the UCLA Phonetics Lab overall facilities page