(One-Way) Repeated Measures ANOVA

Download Report

Transcript (One-Way) Repeated Measures ANOVA

(One-Way) Repeated Measures ANOVA
One-Way Repeated Measures ANOVA
• Generalization of repeated-measures t-test to
independent variable with more than 2 levels.
• Each subject has a score for each level of the
independent variable.
• May be used for repeated or matched designs.
PSYC 6130A, PROF. J. ELDER
2
Example: Visual Grating Detection in Noise
500 ms
500 ms
200 ms
Until Response
PSYC 6130A, PROF. J. ELDER
3
Repeated Measures ANOVA Example:
Grating Detection
Spatial frequency = 0.5 c/deg
Subject
1
2
3
Group Total
s  0.009977
PSYC 6130A, PROF. J. ELDER
Mean
Noise
.15
.04
Group
Total
.50
.08480
.08290
.06830
.06090
.06540
.07610
Mean
.07283
.07330
.08880
.06440
.07120
.07480
.08550
.06453
.07090
.07364
Signal-to-noise ratio (SNR) at threshold
4
Example Grating Detection
PSYC 6130A, PROF. J. ELDER
5
Sum of Squares Analysis
Let Factor A represent Subject.
Let Factor B represent the within-subjects independent variable
(noise level in our example).
SST  SSA  SSB  SSAB  SSerr
SST  dfT s 2




SSA  b X i   X 
SSB  a X  j  X 
SSresid
2
2
SSAB  SSerr  SST  SSA  SSB
PSYC 6130A, PROF. J. ELDER
6
Degrees of Freedom Tree
dfT  NT  1
dfA  a  1
dfwithinS  a(b  1)
dfB  b  1
dfresid  dfAdfB
PSYC 6130A, PROF. J. ELDER
7
Test Statistic
SSB
MSB 
dfB
MSresid 
SSresid
dfresid
PSYC 6130A, PROF. J. ELDER
F
MSB
MSresid
8
Repeated Measures ANOVA Example:
Grating Detection
Spatial frequency = 0.5 c/deg
Subject
1
2
3
Group Total
s  0.009977
PSYC 6130A, PROF. J. ELDER
Mean
Noise
.15
.04
Group
Total
.50
.08480
.08290
.06830
.06090
.06540
.07610
Mean
.07283
.07330
.08880
.06440
.07120
.07480
.08550
.06453
.07090
.07364
Signal-to-noise ratio (SNR) at threshold
9
Step 1. State the Hypothesis
• Same as for 1-way independent ANOVA:
H0 : 1  2  3
Ha : at least 2 means differ
PSYC 6130A, PROF. J. ELDER
10
Step 2. Select Statistical Test and
Significance Level
• As usual
PSYC 6130A, PROF. J. ELDER
11
Step 3. Select Samples and Collect Data
• Ideally, randomly sample
• More probably, random assignment
Group
Total
Noise
.04
Subject
.15
.50
1
.08480
.06830
.06540
Mean
.07283
2
.08290
.06090
.07610
.07330
3
.08880
.06440
.07120
.07480
.08550
.06453
.07090
.07364
Group Total
PSYC 6130A, PROF. J. ELDER
Mean
12
Step 4. Find Region of Rejection
dfT  NT  1
dfA  a  1
dfwithinS  a(b  1)
dfB  b  1  2
dfresid  dfAdfB  2  2  4
PSYC 6130A, PROF. J. ELDER
13
Step 5. Calculate the Test Statistic
Let Factor A represent Subject.
Let Factor B represent the within-subjects independent variable.
SST  SSA  SSB  SSAB  SSerr




SSA  b X i   X 
SSB  a X  j  X 
SSresid
2
2
SSAB  SSerr  SST  SSA  SSB
PSYC 6130A, PROF. J. ELDER
14
Step 5. Calculate the Test Statistic
SSB
MSB 
dfB
MSresid 
SSresid
dfresid
PSYC 6130A, PROF. J. ELDER
F
MSB
MSresid
15
Step 6. Make the Statistical Decisions
PSYC 6130A, PROF. J. ELDER
16
SPSS Output
Tests of W ithin-Subj ects Effects
Measure: MEASURE_1
SSB
SSresid
Source
noise
Error(noise)
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
PSYC 6130A, PROF. J. ELDER
Type III Sum
of Squares
.001
.001
.001
.001
9.66E-005
9.66E-005
9.66E-005
9.66E-005
17
df
2
1.237
2.000
1.000
4
2.473
4.000
2.000
Mean Square
.000
.001
.000
.001
2.41E-005
3.91E-005
2.41E-005
4.83E-005
F
14.355
14.355
14.355
14.355
Sig .
.015
.044
.015
.063
Assumptions
• Independent random sampling
• Multivariate normal distribution
• Homogeneity of variance (not a huge concern, since
there is the same number of observations at each
treatment level).
• Sphericity (new).
PSYC 6130A, PROF. J. ELDER
18
Homogeneity of Variance
• Homogeneity of Variance is the property that the
variance in the dependent variable is the same at each
level of the independent variable.
– In the context of RM ANOVA, this means that the variance
between subjects is the same at each level of the independent
variable.
– Since RM ANOVA designs are balanced by default, homogeneity
of variance is not a critical issue.
PSYC 6130A, PROF. J. ELDER
19
Homogeneity of Variance
Subject
Noise
0.04
0.14
0.5
1
0.0848
0.0683
0.0654
2
0.0829
0.0609
0.0761
3
0.0888
0.0644
0.0712
9.07E-06
1.37E-05
2.87E-05
Variance
PSYC 6130A, PROF. J. ELDER
20
Sphericity
• Sphericity is the property that the degree of interaction
(covariance) between any two different levels of the
independent variable is the same.
• Sphericity is critical for RM ANOVA because the error
term is the average of the pairwise interactions.
• Violations generally lead to inflated F statistics (and
hence inflated Type I error).
PSYC 6130A, PROF. J. ELDER
21
-2
0
Xi1
2
PSYC 6130A, PROF. J. ELDER
4
4
3
2
1
0
-1
-2
-3
-4
Xi3
4
3
2
1
0
-1
-2
-3
-4
-4
Xi3
Xi2
Sphericity Does Not Hold
-2
0
Xi1
22
2
4
4
3
2
1
0
-1
-2
-3
-4
-2
0
Xi2
2
4
-2
0
X
2
i1
PSYC 6130A, PROF. J. ELDER
4
i3
4
3
2
1
0
-1
-2
-3
-4
-4
X
i3
4
3
2
1
0
-1
-2
-3
-4
-4
X
X
i2
Sphericity Does Hold
-2
0
X
i1
23
2
4
4
3
2
1
0
-1
-2
-3
-4
-4
-2
0
X
i2
2
4
Sphericity
• Does sphericity appear to hold?
• Do these graphs suggest that the RM design will yield a
large increase in statistical power?
0.066
0.064
0.062
0.084 0.086 0.088
Noise = .04
PSYC 6130A, PROF. J. ELDER
0.09
0.078
0.078
0.076
0.076
0.074
0.074
Noise = .50
Noise = .50
Noise = .15
0.068
0.06
0.082
sXY  2.0 105
sXY  4.3 106
sXY  3.2 106
0.072
0.07
0.072
0.07
0.068
0.068
0.066
0.066
0.064
0.082 0.084 0.086 0.088
Noise = .04
24
0.09
0.064
0.06 0.062 0.064 0.066 0.068 0.07
Noise = .14
Testing Sphericity
• Mauchly (1940) test: provided automatically by SPSS
– Test has low power (for small samples, likely to accept sphericity
assumption when it is false).
PSYC 6130A, PROF. J. ELDER
25
Alternative: Assume the Worst! (Total Lack of Sphericity)
• Conservative Geisser-Greenhouse F Test (1958)
– Provides a means for calculating a correct critical F value under
the assumption of a complete lack of sphericity (lower bound):
Fcrit (1, dfA )
where
dfA  a  1  number of subjects -1
PSYC 6130A, PROF. J. ELDER
26
Estimating Sphericity
• What if your F statistic falls between the 2 critical values (assuming
sphericity or assuming total lack of sphericity)?
Fcrit (dfB , dfA  dfB )  F  Fcrit (1,dfA )
• Solution: estimate sphericity, and use estimate to adjust critical value.
Sphericity parameter  :
1
  1
dfB
Fcrit (dfB ,dfA  dfB )  Fcrit (  dfB ,  dfA  dfB )
• Two different methods for calculating  :
– Greenhouse and Geisser (1959)
– Huynh and Feldt (1976) – less conservative
PSYC 6130A, PROF. J. ELDER
27
SPSS Output
Mauchly's Test of Sphericity
Measure: MEASURE_1
a
Epsilon
Approx.
Greenhous
Mauchly's W Chi-Square
df
Sig.
e-Geisser
Huynh-Feldt Lower-bound
.383
.960
2
.619
.618
1.000
.500
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is
proportional to an identity matrix.
a. May 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.
Within Subjects Effect
noise
Tests of W ithin-Subj ects Effects
Measure: MEASURE_1
SSB
SSresid
Source
noise
Error(noise)
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
PSYC 6130A, PROF. J. ELDER
Type III Sum
of Squares
.001
.001
.001
.001
9.66E-005
9.66E-005
9.66E-005
9.66E-005
df
2
1.237
2.000
1.000
4
2.473
4.000
2.000
28
Mean Square
.000
.001
.000
.001
2.41E-005
3.91E-005
2.41E-005
4.83E-005
F
14.355
14.355
14.355
14.355
Sig .
.015
.044
.015
.063
End of Lecture 17
Multivariate Approach to Repeated Measures
• Based on forming difference scores for each pair of levels of the
independent variable.
– e.g., for our 3-level example, there are 3 pairs
• Each pair of difference scores is treated as a different dependent
variable in a MANOVA.
• Sphericity does not need to be assumed.
• When all assumptions of the repeated measures ANOVA are met,
ANOVA is usually more powerful than MANOVA (especially for small
samples).
• Thus multivariate approach should be considered only if there is
doubt about sphericity assumption.
• When sphericity does not apply, MANOVA can be much more
powerful for large samples.
PSYC 6130A, PROF. J. ELDER
30
Post-Hoc Comparisons
• If very confident about sphericity, use standard methods (e.g.,
Fisher’s LSD, Tukey’s HSD), with MSresid as error term.
• Otherwise, use conservative approach: Bonferroni test.
– Error term calculated separately for each comparison, using only the
data from the two levels.
– This means that sphericity need not be assumed.
Pairwise Comparisons
Measure: MEASURE_1
(I) noise
1
2
3
(J) noise
2
Mean
Difference
(I-J)
95% Confidence Interval for
a
Difference
Std. Error
Sig.
a
Lower Bound
Upper Bound
.021 *
.002
.037
.003
.039
3
.015
.004
.197
-.015
.045
1
-.021*
.002
.037
-.039
-.003
3
-.006
.005
1.000
-.046
.034
1
-.015
.004
.197
-.045
.015
2
.006
.005
1.000
-.034
.046
Based on estimated marginal means
*. The mean difference is significant at the .05 level.
a. Adjustment for multiple comparisons: Bonferroni.
PSYC 6130A, PROF. J. ELDER
31
Reporting the Result
• One-way repeated measures ANOVA reveals a
significant effect of noise contrast on the signal-to-noise
ratio at threshold (F[2,4]=14.4, p=.044,  =0.618). Post-
hoc pairwise Bonferroni-corrected comparisons reveal
that signal-to-noise ratio at threshold was higher at 4.8%
noise contrast than at 14.3% noise contrast (p=.037).
No other significant pairwise differences were found
(p>.05).
PSYC 6130A, PROF. J. ELDER
32
Varieties of Repeated-Measures and
Randomized-Blocks Designs
•
Simultaneous RM Design
– e.g., subject rates different aspects of stimulus on comparable rating scale.
•
Successive RM Design
– Here counterbalancing becomes important
•
RM Over Time
– Track a dependent variable over time (e.g., learning effects)
– Not likely to satisfy sphericity (scores taken closer in time will have higher
covariance).
•
RM with Quantitative Levels
– Think about regression first.
•
Randomized Blocks
– Matched design useful if you cannot avoid serious carryover effects.
•
Natural blocks
– Blocks of subjects are naturally occuring (e.g., children in same family)
PSYC 6130A, PROF. J. ELDER
33