Using SPSS for RM-ANOVA

advertisement
USING SPSS: ONE-WAY REPEATED-MEASURES ANOVA
1. ENTERING THE DATA:
To do a repeated-measures ANOVA (also called a within-subjects ANOVA), you
have to enter the data in a different format from that used for independent-measures
ANOVA's (between-subjects ANOVAs). The scores for each of the experimental
conditions that the subjects do are entered in separate columns.
Take the following example. Imagine we were interested in the effects of practice
on doing statistics with computers. Suppose we tested eight people three times on
their ability to perform a one-way repeated-measures ANOVA using SPSS. Let's call
these three tests "test1", "test2" and "test3". Here's how we would enter the data
(which consists of times to complete the task, in minutes). As you can see, each row
provides all of a single subject's data in the experiment: the row tells SPSS which
subject the data come from, and the column tells SPSS which condition each score
belongs to.
2. PERFORMING THE RM-ANOVA:
(a) Click on "Analyze" on the SPSS controls. On the menu that appears, click on
"General Linear Model". On the menu that this produces, click on "Repeated
Measures". This will produce a dialog box that looks like this:
(b) In the box labelled "Within-Subject Factor Name", enter a name for your
repeated-measures variable. In this case, I will replace the suggested title
("Factor1") with something more meaningful to me: "testtime". You don't have to do
this; SPSS would quite happily proceed with your repeated-measures IV called
"factor1", but a more meaningful label will help in the future, when we have more
than one IV.
(c) Now move the cursor down to the box that says "number of levels". You need
to tell SPSS how many "levels" (occasions or conditions) there are of your repeatedmeasures variable – for the current ANOVA design, this simply corresponds to
telling SPSS how many conditions you have in this experiment. We have three tests,
so the answer is "3". Type 3 in this box, and then click on "Add". The box to the right
of the "Add" button will now show the name that you have chosen for your repeatedmeasures IV, with the number of levels behind it in brackets. In this case, you would
see "testtime(3)", for example.
RM ANOVA
Page 2
(d) Now click on the button labelled "Define..." A dialog box will pop up, like this
one:
The left-hand box contains the names of the columns in your SPSS data-window.
Highlight the names of the various columns that represent different levels of the
independent variable, and press on the arrow-button to move them into the slots
containing question marks in the right-hand box. In this case, "test1", "test2" and
"test3" are the three levels of our independent variable (that we have just called
"testtime"), and so we move them into the right-hand box.
(e) At the bottom of the dialog box, there is a button labelled "Options..." Click on
this, and a new dialog box pops up. On the left, you will see a box entitled
"Descriptive statistics". Click on this, and then "continue" to return to the previous
dialog box.
(f) Click on "Contrasts…". In the "Change Contrast" section use the arrow to find
the "Repeated" contrast, and then click on "Change", and then "Continue" (this is to
produce a type of post hoc tests). This function is optional – and should only be used
if the produced output will be meaningful.
RM ANOVA
Page 3
(g) Now click on the button labelled "OK" to perform the ANOVA. You should
have output that looks like this. (The bracketed comments in italics explain what
each bit of the output means).
3. THE SPSS OUTPUT:
General Linear Model
W ithin-Subje cts Factors
Measure: MEASURE_1
TESTTIME
1
2
3
Dependent
Variable
TEST1
TEST2
TEST3
Descriptive Statistics
TEST1
TEST2
TEST3
Mean
178.1250
99.6250
88.7500
Std. Deviation
72.7980
38.2172
35.1273
N
8
8
8
[Unfortunately SPSS produces output you do not need for this example. Ignore the
following "Multivariate Tests" table for now - we will briefly review this process.]
Multivariate Testsb
Effect
TESTTIME
Pillai's Trace
Wilks' Lambda
Hotelling's Trace
Roy's Largest Root
Value
.821
.179
4.594
4.594
F
Hypothesis df
a
13.782
2.000
13.782 a
2.000
a
13.782
2.000
13.782 a
2.000
Error df
6.000
6.000
6.000
6.000
Sig.
.006
.006
.006
.006
a. Exact s tatis tic
b.
Design: Intercept
Within Subjects Des ign: TESTTIME
[The following section gives the results of a test that SPSS does to see if your data
satisfy one of the requirements for doing a repeated-measures ANOVA – the so-called
“sphericity assumption”. Imagine creating a new variable (test1-test2). Now find the
variance of this new variable. Then imagine you create a variable (test2-test3), and find
its variance, and finally you find the variance of (test1-test3). The sphericity assumption
is that the variances of these three new variables are equal – it is the equivalent of the
homogeneity of variance assumption you previously checked in the between subjects
case. Happily, you do not need to create all these variables and compare their
RM ANOVA
Page 4
variances because SPSS tests the sphericity assumption for you automatically. If the
test produces a significant result, the sphericity assumption has been violated. This
means the p-value for the test of the within-subjects factor needs to be adjusted, which
SPSS does for you – see below, the p associated with the Huynh-Feldt correction. In
this example, the Mauchly Sphericity test is not significant (p = 0.178, which is greater
than .05), so there's no problem.]
[Further note for the curious: Just for your information, the multivariate tests in the table
above are another way of testing the main effect of testtime that are valid whether or not
sphericity is satisfied. However, we will rely on the Huynh-Feldt solution when sphericity
is violated, not the multivariate solution, that's why you can ignore the multivariate tests.]
As a general rule, if the Epsilon value is < .75 – we would use the Greenhouse-Geisser
adjustment, and if the Epsilon value is > .75 – we would use the Huynh-Feldt
adjustment. Either way is acceptable – and can be supported through solid references.
b
Ma uchly's Test of Spheri city
Measure: MEASURE_1
a
Epsilon
W ithin Subject s Effect Mauchly's W
TESTTIME
.565
Approx .
Chi-Square
3.427
df
2
Sig.
.178
Greenhous
e-Geis ser
.697
Huynh-Feldt
.816
Lower-bound
.500
Tests the null hypothes is that t he error covariance matrix of the orthonormalized transformed dependent variables is
proportional to an ident ity matrix.
a. May be us ed t o adjust the degrees of freedom for the averaged t ests of s ignificance. Corrected tests are displayed in the
Tests of W ithin-Subjec ts Effect s table.
b.
Design: Int ercept
W ithin Subject s Design: TESTTIME
[The interesting bit: the result of our experiment! Ignore all the rows labelled
“Greenhouse-Geisser”, “Huyhn-Feldt” and “Lower bound”. In this case, look at the row
labelled "Sphericity Assumed" – because, as we have just seen, the sphericity
assumption was satisfied for these data. In this case, we can see that there is a highly
significant effect of the "testtime" variable: in other words, there is a significant
difference between the three tests in terms of the average time taken to complete the
task – so significant that it is shown as .000. Remember, this is not zero - it merely
means that SPSS can't display it, and that it's actually some value smaller than .001
(i.e., p < .001). IF the assumption of sphericity had been violated you would have
considered the rows labelled “Huynh Feldt”, which corrects for violations of assumptions
by adjusting the degrees of freedom downwards by an appropriate amount, which
increases the p value. The other rows – “Greenhouse Geisser” and “Lower bound” are
other corrections, but more strict than is necessary, so Huynh Feldt is the one to use in
general. If you had needed to use the Huynh Feldt correction, you would have reported
the results as: “F(1.63, 11.42) = 25.83, p < .001, with Huynh Feldt correction”.]
RM ANOVA
Page 5
Tests of Within-Subjects Effects
Measure: MEASURE_1
Source
TESTTIME
Error(TESTTIME)
Sphericity Assumed
Greenhous e-Geisser
Huynh-Feldt
Lower-bound
Sphericity Assumed
Greenhous e-Geisser
Huynh-Feldt
Lower-bound
Type III Sum
of Squares
38049.083
38049.083
38049.083
38049.083
10310.917
10310.917
10310.917
10310.917
df
2
1.394
1.632
1.000
14
9.755
11.423
7.000
Mean Square
19024.542
27303.164
23317.087
38049.083
736.494
1056.983
902.671
1472.988
F
25.831
25.831
25.831
25.831
Sig.
.000
.000
.000
.001
[The tests produced below are a type of post hoc test. As in the between-subjects case,
the significant main effect only tells us that there is some significant difference between
our conditions: it does not tell us the reason for this difference. SPSS does not perform
Tukeys for repeated measures designs. Instead, it tests the difference between
successive levels of your independent variable. We can see below that test1 is
significantly different from test2, but that test2 and test3 do not differ significantly.
Remember these are post hoc tests, so you would only report them if the overall F
above was significant.]
Tests of Within-Subjects Contrasts
Measure: MEASURE_1
Source
TESTTIME
Error(TESTTIME)
TESTTIME
Level 1 vs. Level 2
Level 2 vs. Level 3
Level 1 vs. Level 2
Level 2 vs. Level 3
Type III Sum
of Squares
49298.000
946.125
11092.000
4068.875
df
1
1
7
7
Mean Square
49298.000
946.125
1584.571
581.268
F
31.111
1.628
Sig.
.001
.243
[Remember for the between-subjects case, the Tukeys post hoc test allowed you to
compare each condition with every other condition – it performed all possible pair-wise
comparisons. You can still perform all possible pair-wise comparisons for the repeated
measure case if you think the comparisons in the table above do not test the
comparisons of interest to you, it is just that SPSS does not do this automatically.
Nonetheless, you can perform a post hoc test called “Fisher’s protected t” easily
enough. This just means you use repeated-measures (paired or dependent-samples) ttests to see which pairs of levels are significantly different (go to "Analyze", "Compare
Means", and then "Paired-Samples T Test"). However, you only perform the t-tests if the
overall F is significant.]
RM ANOVA
Page 6
[If your repeated measures independent variable has four or more levels – you will need
to make an adjustment to your alpha prior to interpretation of the results for the posthoc. One procedure is the Bonferroni adjustment: If you are using an alpha level of 0.05
and going to perform n tests, then a test must be significant at the.05/n level to be
counted as significant. For example, if you had five levels, there are 10 possible pairwise comparisons (level1 with level2, level1 with level3, etc). So you could test all 10
comparisons at the .05/10 = .005 level. Or, maybe you could tell in advance of looking
at your data that there are only, say, five comparisons of theoretical interest, and test
only these at the .05/5 = .01 level. That would make it easier for you to obtain a
significant result. In the current example, we are only doing three tests (shown below),
and the results are quite clear-cut: two of the tests are significant at p = 0.001, and the
other is not even close to being significant (see next section for the results of the tests).]
Some statisticians would still argue that a Bonferroni adjustment must be conducted on
this post hoc procedure – even with just three levels… For our example, the adjusted
alpha (.05/3 = .017) does not alter our findings… However, this may not always be the
case – so, it is arguably better to error on the side of conservative interpretations.
Paired Samples Test
Paired Differences
Pair 1
Pair 2
Pair 3
TEST1 - TEST2
TEST1 - TEST3
TEST2 - TEST3
Mean
78.5000
89.3750
10.8750
Std. Error
Mean
14.07379
16.78215
8.52399
Std. Deviation
39.80668
47.46709
24.10950
95% Confidence
Interval of the
Difference
Lower
Upper
45.2208
111.7792
49.6915
129.0585
-9.2810
31.0310
t
5.578
5.326
1.276
df
7
7
7
Sig. (2-tailed)
.001
.001
.243
Another method for adjusting the alpha level (controlling for familywise error rate across
the levels at the a priori alpha level) is the Holm’s sequential Bonferroni procedure. See
Green and Salkind (pages 218-219) for an example of this procedure…
[The following section tells you if the overall mean of all your data is significantly
different from zero. This is not interesting for these data – reaction times must always
be positive so of course the population mean is above zero. But you might have a
dependent variable where, for example, 0 corresponds to some chance baseline and it
would be interesting to know whether the subjects as a whole scored significantly above
chance.]
Te sts of Betw een-Subjects Effects
Measure: MEASURE_1
Transformed Variable: Average
Source
Int ercept
Error
Ty pe III Sum
of Squares
358192.667
45647. 333
df
1
7
Mean Square
358192.667
6521.048
F
54.929
Sig.
.000
RM ANOVA
Page 7
INTERPRETATION:
The mean time taken to complete the computer statistics test was 178.13 minutes
on the first test; 99.63 minutes on the second test; and 88.75 minutes on the third and
final test. The one-way repeated-measures ANOVA shows that these times are
significantly different, F(2, 14) = 25.83, p < 0.001. Repeated-measures t-tests (using a
Bonferroni adjustment,  = .05/3 = .017) showed that subjects were significantly slower
on the first test than they were on the second and third tests (test 1 versus test 2: t(7) =
5.58, p < 0.01, ES = 2.89; test 1 versus test 3: t(7) = 5.33, p < 0.01, ES = 3.29), but that
there was no further reduction in completion time between the second and third tests
(test 2 versus test 3: t(7) = 1.28, p = .243, not significant). It appears that practice
produces an initial rapid improvement in subjects' speed of performing a task with
SPSS, but that additional practice leads to little or no further improvement (completely
fictional, of course!).
RM ANOVA
Page 8
Download