Chapter 11A Multi-Factor Repeated Measures ANOVA Repeated Measures On Both Factors
Chapter 11A Multi-Factor Repeated Measures ANOVA Repeated Measures On Both Factors
Chapter 11A Multi-Factor Repeated Measures ANOVA Repeated Measures On Both Factors
Page
1. Introduction 11-2
2. Structural model, SS partitioning, and the ANOVA table 11-3
3. Two-Factor Repeated Measures ANOVA in SPSS 11-8
4. Contrasts and Effect Sizes 11-12
5. An example 11-27
1. Introduction
Pre-training Post-training
Participant Subscale1 Subscale2 Subscale3 Subscale1 Subscale2 Subscale3
1 42 42 48 48 60 78
2 42 48 48 36 48 60
3 48 48 54 66 78 78
4 42 54 54 48 78 90
5 54 66 54 48 66 72
6 36 42 36 36 48 54
7 48 48 60 54 72 84
8 48 60 66 54 72 90
9 54 60 54 48 72 78
10 48 42 54 54 66 78
46.2 51.0 52.8 49.2 66.0 76.2
80 80
Test Score
Test Score
70 Scale1 70
Pre
60 Scale2 60
Post
50 Scale3 50
40 40
Pre Post Scale1 Scale2 Scale3
Time Time
( )
j =1
jk = 0 for each level of j
b
( )
k =1
jk = 0 for each level of k
Participant Difference
Pre- Post-
Training Training
1 44 62 18
2 46 48 2
3 50 74 24
4 50 72 22
5 58 62 4
6 38 46 8
7 52 70 18
8 58 72 14
9 56 66 10
10 48 66 18
50.0 63.8 13.8
SS Total
(SS Corrected Total)
SS Model SS Error
SS Main SS 2-Way SS SS SS SS
Effects Interactions A*S B*S A*B*S Subject
SS SS SS
A B A*B
Source SS df MS E(MS) F
Factor A SSA a-1 SSA nb 2j MSA
a 1 + b +
2 2
MS ( A * S )
a 1
A*S SS (a-1)(n-1) SS ( A * S ) + b
2 2
(a 1)(b 1) MS ( A * B * S )
A*B*S SS (a-1)(b-1) SS ( A * B * S ) 2 +
2
If H0 is true: 2
j =0
2 + b
2
Then FA = 2 =1
+ b
2
If H0 is false: 2
j >0
nb 2j
2 + b
2
+
Then FA = a 1 >1
2 + b
2
If you do not identify the factors properly, you will misinterpret your
results!
o If we switched the order of the factors, we would need to also switch the
order of the variables:
GLM pre1 post1 pre2 post2 pre3 post3
/WSFACTOR = scale 3 time 2
/PRINT = DESC.
This syntax will give us exactly the same output as the syntax above
Measure: MEASURE_1
Epsilon
Greenhous
Within Subjects Effect e-Geisser Huynh-Feldt Lower-bound
TIME 1.000 1.000 1.000
SCALE .962 1.000 .500
TIME * SCALE .904 1.000 .500
Tests the null hypothesis that the error covariance matrix of the
orthonormalized transformed dependent variables is proportional to
an identity matrix.
Measure: MEASURE_1
Type III Sum
Source of Squares df Mean Square F Sig.
TIME Sphericity Assumed 2856.600 1 2856.600 33.766 .000
Error(TIME) Sphericity Assumed 761.400 9 84.600
SCALE Sphericity Assumed 2899.200 2 1449.600 40.719 .000
Error(SCALE) Sphericity Assumed 640.800 18 35.600
TIME * SCALE Sphericity Assumed 1051.200 2 525.600 45.310 .000
Error(TIME*SCALE) Sphericity Assumed 208.800 18 11.600
Test Performance
80
Test Score
70
Pre
60
Post
50
40
Scale1 Scale2 Scale3
Time
t observed =
=
c j X.j
standard error ( ) c 2j
MSE
n
2 SS
SS = F (1, df ) =
c 2j MSE
n
Measure: MEASURE_1
Type III Sum
Source of Squares df Mean Square F Sig.
TIME Sphericity Assumed 2856.600 1 2856.600 33.766 .000
Error(TIME) Sphericity Assumed 761.400 9 84.600
SCALE Sphericity Assumed 2899.200 2 1449.600 40.719 .000
Error(SCALE) Sphericity Assumed 640.800 18 35.600
TIME * SCALE Sphericity Assumed 1051.200 2 525.600 45.310 .000
Error(TIME*SCALE) Sphericity Assumed 208.800 18 11.600
2856.6 2899.2
Time
2
= = .80 Scale
2
= = .82
2856.6 + 761.4 2899.2 + 640.8
1051.2
Time
2
*Scale = = .83
1051.2 + 208.8
This formula can be used for omnibus tests and for contrasts.
For all contrasts, we can also compute an r as a measure of the effect size.
2
t Contrast FContrast
r = =
2
t Contrast + df contrast FContrast + df contrast
Method 1: Compute a new variable for each contrast, and test if the value of
the contrast differs from zero.
o Lets start by testing three of our hypotheses
Std. Error
N Mean Std. Deviation Mean
DIFF1 10 3.0000 7.61577 2.40832
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
DIFF1 1.246 9 .244 3.0000 -2.4480 8.4480
3 .0
d = = = 0.39
7.61577
Test Performance
80
No. The scores on sub-scale 1
do not change significantly
Test Score
70
60
Pre between pre- and post-test, t(9)
Post = 1.25, p = .24, d = .39
50
40
Scale1 Scale2 Scale3
Time
One-Sample Statistics
Std. Error
N Mean Std. Deviation Mean
diff2 10 15.0000 10.67708 3.37639
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
diff2 4.443 9 .002 15.00000 7.3621 22.6379
15
d = = = 1.40
10.67708
Test Performance
Yes. The scores on sub-scale
80
2 significantly improve
Test Score
70
Pre between pre- and post-test,
60 t(9) = 4.44, p < .01, d = 1.40
Post
50
40
Scale1 Scale2 Scale3
Time
One-Sample Statistics
Std. Error
N Mean Std. Deviation Mean
diff3 10 23.4000 6.60303 2.08806
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
diff3 11.207 9 .000 23.40000 18.6765 28.1235
22.4
d = = = 3.54
6.60303
Test Performance
80
Yes. The scores on sub-scale 3
significantly improve between
Test Score
70
60
Pre pre- and post-test, t(9) = 11.21, p
Post < .01, d = 3.54
50
40
Scale1 Scale2 Scale3
Time
T-TEST PAIRS = pre1 pre2 pre3 WITH post1 post2 post3 (PAIRED).
Paired Samples Test
Paired Differences
95% Confidence
Interval of the
Std. Error Difference
Mean Std. Deviation Mean Lower Upper t df Sig. (2-tailed)
Pair 1 pre1 - post1 -3.00000 7.61577 2.40832 -8.44800 2.44800 -1.246 9 .244
Pair 2 pre2 - post2 -15.00000 10.67708 3.37639 -22.63792 -7.36208 -4.443 9 .002
Pair 3 pre3 - post3 -23.40000 6.60303 2.08806 -28.12352 -18.67648 -11.207 9 .000
70
65
60
Pre-test
55
Post-test
50
45
40
Subscale 1 Subscale 2
80 80
75 75
70 70
65 65
Pre-test Pre-test
60 60
Post-test Post-test
55 55
50 50
45 45
40 40
Subscale 1 Subscale 3 Subscale 2 Subscale 3
Measure: MEASURE_1
Type III Sum
Source time scale of Squares df Mean Square F Sig.
time Level 2 vs. Level 1 1904.400 1 1904.400 33.766 .000
Error(time) Level 2 vs. Level 1 507.600 9 56.400
scale Level 2 vs. Level 1 1166.400 1 1166.400 38.368 .000
Level 3 vs. Level 1 2822.400 1 2822.400 66.566 .000
Error(scale) Level 2 vs. Level 1 273.600 9 30.400
Level 3 vs. Level 1 381.600 9 42.400
time * scale Level 2 vs. Level 1 Level 2 vs. Level 1 1440.000 1 1440.000 45.000 .000
Level 3 vs. Level 1 4161.600 1 4161.600 83.903 .000
Error(time*scale) Level 2 vs. Level 1 Level 2 vs. Level 1 288.000 9 32.000
Level 3 vs. Level 1 446.400 9 49.600
o There are only two groups in the time factor, so no matter what we ask
SPSS to do, it will give us a pairwise contrast
Pre-test Post test
X ..1 = 50.0 X ..2 = 63.8
Coefficients -1 +1
SS Contrast 1904.4
Contrast
2
= = = .79
SS Contrast + SS ErrorTermForContrast 1904.4 + 507.6
o For the scale effect there are three groups, so we can ask SPSS to conduct
two main effect contrasts:
Subscale 1 Subscale 2 Subscale 3
X .1. = 47.7 X .2. = 58.5 X .3. = 64.5
Level 2 vs Level 1 -1 1 0
Level 3 vs Level 1 -1 0 1
1166.4 2822.4
22vs1 = = .81 32vs1 = = .88
1166.4 + 273.6 2822.4 + 381.6
70
65
60 1440
Pre-test Contrast
2
= = .83
55
Post-test
1440 + 288
50
80
75
70
65 4161.6
Pre-test Contrast
2
= = .90
60
Post-test
4161.6 + 446
55
50
F (1,9) = 83.90, p < .01, 2 = .90
45
40
Subscale 1 Subscale 3
Measure: MEASURE_1
Type III Sum
Source time scale of Squares df Mean Square F Sig.
time Level 2 vs. Level 1 1904.400 1 1904.400 33.766 .000
Error(time) Level 2 vs. Level 1 507.600 9 56.400
scale Level 1 vs. Level 2 1166.400 1 1166.400 38.368 .000
Level 3 vs. Level 2 360.000 1 360.000 10.588 .010
Error(scale) Level 1 vs. Level 2 273.600 9 30.400
Level 3 vs. Level 2 306.000 9 34.000
time * scale Level 2 vs. Level 1 Level 1 vs. Level 2 1440.000 1 1440.000 45.000 .000
Level 3 vs. Level 2 705.600 1 705.600 12.250 .007
Error(time*scale) Level 2 vs. Level 1 Level 1 vs. Level 2 288.000 9 32.000
Level 3 vs. Level 2 518.400 9 57.600
80
75
70
65 705.6
Pre-test Contrast
2
= = .58
60
Post-test
705.6 + 518.4
55
50
45
F (1,9) = 12.25, p < .01, 2 = .58
40
Subscale 2 Subscale 3
Measure: MEASURE_1
Type III Sum
Source FACTOR of Squares df Mean Square F Sig.
FACTOR L1 17139.600 1 17139.600 33.766 .000
L2 90.000 1 90.000 1.552 .244
L3 2250.000 1 2250.000 19.737 .002
L4 5475.600 1 5475.600 125.587 .000
L5 8294.400 1 8294.400 45.474 .000
Error(FACTOR) L1 4568.400 9 507.600
L2 522.000 9 58.000
L3 1026.000 9 114.000
L4 392.400 9 43.600
L5 1641.600 9 182.400
Measure: MEASURE_1
Type III Sum
Source FACTOR of Squares df Mean Square F Sig.
FACTOR L1 17139.600 1 17139.600 33.766 .000
L2 90.000 1 90.000 1.552 .244
L3 2250.000 1 2250.000 19.737 .002
L4 5475.600 1 5475.600 125.587 .000
L5 8294.400 1 8294.400 45.474 .000
Error(FACTOR) L1 4568.400 9 507.600
L2 522.000 9 58.000
L3 1026.000 9 114.000
L4 392.400 9 43.600
L5 1641.600 9 182.400
Test Performance
80
Test Score
70
Pre
60
Post
50
40
Scale1 Scale2 Scale3
Time
o The alternative is to conduct the tests for main effects and interactions,
and then conduct the contrasts as follow-up tests. Now, the contrasts are
post-hoc tests. If they are pairwise, then you need to use the Tukey
procedure; if they are complex, you need to use the Scheff procedure to
adjust the p-values.
qcrit (qcrit )2
Compare tobserved to or Fobserved to
2 2
80
70
Test Score
Pre-test
60
Post-test
50
40
Scale 1 Scale 2 Scale 3
Scale
o We should have a separate variance estimate of the error bars for each
cell
s 2jk
StdError =
n
o SPSS and EXCEL are not good for plotting separate error bars for each
cell. The best you can do is to compute a common standard error based
on the error term for the highest order interaction. This error bar is
misleading (because you did not actually use it in your analyses). If you
plan to publish using repeated measures data, get better graphical
software.
Distortion 0 90 180
None 1.32 1.69 1.49 1.50
Upside-Down 5.02 4.58 3.41 4.34
Whitened/Blackened 4.81 5.41 5.47 5.23
3.72 3.89 3.46 3.69
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
Tests of Normality
6
Shapiro-Wilk 6
Statistic df Sig. 5
2
USD_90 .980 6 .950
USD_180 .872 6 .235 1
3
o Sphericity
Measure: MEASURE_1
Epsilon
Greenhous
Within Subjects Effect e-Geisser Huynh-Feldt Lower-bound
ORIENTAT .963 1.000 .500
DISTORT .932 1.000 .500
ORIENTAT * DISTORT .462 .720 .250
Distortion 0 90 180
None
Upside-Down
Whitened/Blackened
Linear -1 0 +1
Quadratic +1 -2 +1
Marginal Orientation Means
4
Rating of Bizarreness
3.75
3.5
3.25
3
0 90 180
Orientation
Measure: MEASURE_1
Type III Sum
Source orientat distort of Squares df Mean Square F Sig.
orientat Linear .606 1 .606 5.772 .061
Quadratic 1.143 1 1.143 13.537 .014
Error(orientat) Linear .525 5 .105
Quadratic .422 5 .084
SS Linear .606
Linear
2
= = = .54
SS Linear + SS ErrorTermForLinear .606 + .525
1.143
Quadratic
2
= = .73
1.143 + .422
T-TEST /TESTVAL=0
/VARIABLES=lin_ori quad_ori.
One-Sample Statistics
Std. Error
N Mean Std. Deviation Mean
LIN_ORI 6 -.7783 .79356 .32397
QUAD_ORI 6 -1.8517 1.23274 .50327
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
LIN_ORI -2.402 5 .061 -.7783 -1.6111 .0545
QUAD_ORI -3.679 5 .014 -1.8517 -3.1454 -.5580
These results exactly match the results obtained from using SPSSs
built-in main effect contrasts.
2
t Contrast 2.402 2 3.679 2
rlinear = = = .73 rquad = = .85
2
t Contrast + df contrast 2.404 2 + 5 3.679 2 + 5
Distortion 0 90 180
None Linear -1 0 +1
Quadratic +1 -2 +1
Upside-Down
Whitened/Blackened
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
Distortion 0 90 180
None
Upside-Down
Whitened/Blackened Linear -1 0 +1
Quadratic +1 -2 +1
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
T-TEST /TESTVAL=0
/VARIABLES=lin_nod quad_nod lin_usd quad_usd lin_wb quad_wb .
One-Sample Statistics
Std. Error
N Mean Std. Deviation Mean
LIN_NOD 6 .1717 .81121 .33117
QUAD_NOD 6 -.5817 .33030 .13484
LIN_USD 6 -1.6083 .38039 .15529
QUAD_USD 6 -.7217 1.28395 .52417
LIN_WB 6 .6583 .87894 .35883
QUAD_WB 6 -.5483 1.13125 .46183
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
LIN_NOD .518 5 .626 .1717 -.6796 1.0230
QUAD_NOD -4.314 5 .008 -.5817 -.9283 -.2350
LIN_USD -10.357 5 .000 -1.6083 -2.0075 -1.2091
QUAD_USD -1.377 5 .227 -.7217 -2.0691 .6258
LIN_WB 1.835 5 .126 .6583 -.2641 1.5807
QUAD_WB -1.187 5 .288 -.5483 -1.7355 .6388
2
t Contrast 0.518 2 4.314 2
rLinearNoDistort = = = .23 rQuadNoDistort = = .89
2
t Contrast + df contrast 0.518 2 + 5 4.314 2 + 5
10.357 2 1.377 2
rLinearUpsideDown = = .98 rQuadUpsideDown = = .28
10.357 2 + 5 1.377 2 + 5
1.835 2 1.187 2
rLinearWhitenedBlacked = = .63 rQuadWhitenedBlackened = = .47
1.835 2 + 5 1.187 2 + 5
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
Measure: MEASURE_1
Type III Sum
Source orientat of Squares df Mean Square F Sig.
orientat Linear .088 1 .088 .269 .626
Quadratic .338 1 .338 18.608 .008
Error(orientat) Linear 1.645 5 .329
Quadratic .091 5 .018
.08841 .338
LinearNoDi
2
stortion = = .05 QuadraticN
2
oDistortion = = .79
.08841 + 1.645 .338 + .09091
Measure: MEASURE_1
Type III Sum
Source orientat of Squares df Mean Square F Sig.
orientat Linear 7.760 1 7.760 107.262 .000
Quadratic .521 1 .521 1.896 .227
Error(orientat) Linear .362 5 .072
Quadratic 1.374 5 .275
7.76 .521
LinearUpsi
2
deDown = = .96 QuadraticU
2
psideDown = = .27
7.76 + .362 .521 + 1.374
Measure: MEASURE_1
Type III Sum
Source orientat of Squares df Mean Square F Sig.
orientat Linear 1.300 1 1.300 3.366 .126
Quadratic .301 1 .301 1.410 .288
Error(orientat) Linear 1.931 5 .386
Quadratic 1.066 5 .213
1.300 .301
LinearWhit
2
enedBlackened = = .40 QuadraticW
2
hitenedBlackened = = .22
1.300 + 1.931 .301 + 1.066
The syntax and output for this method is not included here.
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
GLM nod_zer usd_zer wb_zer nod_90 usd_90 wb_90 nod_180 usd_180 wb_180
/WSFACTOR = orientat 3 Polynomial distort 3 Simple(1)
/PRINT = DESCRIPTIVE.
Tests of Within-Subjects Contrasts
Measure: MEASURE_1
Type III Sum
Source ORIENTAT DISTORT of Squares df Mean Square F Sig.
ORIENTAT Linear .202 1 .202 5.772 .061
Quadratic .381 1 .381 13.537 .014
Error(ORIENTAT) Linear .175 5 3.499E-02
Quadratic .141 5 2.814E-02
DISTORT Level 2 vs. Level 1 145.010 1 145.010 382.927 .000
Level 3 vs. Level 1 250.358 1 250.358 621.185 .000
Error(DISTORT) Level 2 vs. Level 1 1.893 5 .379
Level 3 vs. Level 1 2.015 5 .403
ORIENTAT * DISTORT Linear Level 2 vs. Level 1 9.505 1 9.505 20.243 .006
Level 3 vs. Level 1 .711 1 .711 .755 .425
Quadratic Level 2 vs. Level 1 1.960E-02 1 1.960E-02 .082 .787
Level 3 vs. Level 1 1.111E-03 1 1.111E-03 .004 .951
Error(ORIENTAT*DIST Linear Level 2 vs. Level 1 2.348 5 .470
ORT) Level 3 vs. Level 1 4.705 5 .941
Quadratic Level 2 vs. Level 1 1.201 5 .240
Level 3 vs. Level 1
1.338 5 .268
5
5
4
4
Bizarreness
Bizarreness
None
None
3 Upside-Down
3 Upside-Down
Whitened/Blackened
Whitened/Blackened
2
2
1 1
0 0
0 90 180 0 90 180
Rotation Rotation
4
Bizarreness
None
3 Upside-Down
Whitened/Blackened
0
0 90 180
Rotation
Distortion 0 90 180
None 1.32 1.69 1.49 1.50
Upside-Down 5.02 4.58 3.41 4.34
Whitened/Blackened 4.81 5.41 5.47 5.23
3.72 3.89 3.46 3.69
o Within each level of orientation, lets compare the distorted faces to the
non-distorted control.
compute comp1 = usd_zer - nod_zer.
compute comp2 = wb_zer - nod_zer.
T-TEST /TESTVAL=0
/VARIABLES=comp1 to comp6.
One-Sample Statistics
Std. Error
N Mean Std. Deviation Mean
COMP1 6 3.7050 .29187 .11916
COMP2 6 3.4917 .71065 .29012
COMP3 6 2.8850 .42505 .17353
COMP4 6 3.7183 .64691 .26410
COMP5 6 1.9250 .90697 .37027
COMP6 6 3.9783 .82956 .33867
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
COMP1 31.093 5 .000 3.7050 3.3987 4.0113
COMP2 12.035 5 .000 3.4917 2.7459 4.2374
COMP3 16.626 5 .000 2.8850 2.4389 3.3311
COMP4 14.079 5 .000 3.7183 3.0394 4.3972
COMP5 5.199 5 .003 1.9250 .9732 2.8768
COMP6 11.747 5 .000 3.9783 3.1078 4.8489
Std. Error
N Mean Std. Deviation Mean
COMP7 6 .2133 .80746 .32964
COMP8 6 -.8333 .64242 .26227
COMP9 6 -2.0533 .95007 .38786
One-Sample Test
Test Value = 0
95% Confidence
Interval of the
Mean Difference
t df Sig. (2-tailed) Difference Lower Upper
COMP7 .647 5 .546 .2133 -.6340 1.0607
COMP8 -3.177 5 .025 -.8333 -1.5075 -.1592
COMP9 -5.294 5 .003 -2.0533 -3.0504 -1.0563
When faces are presented upside-down, then the faces with eyes
whitened and teeth blacked are rated as more bizarre than faces with
up-side down eyes and mouth, t (5) = 5.29, p < .05, d = 2.16
In other orientations (upright and 90), there are no significant
differences in ratings of the two distorted faces, ds < 1.29.
Distortion 0 90 180
None 1.32 1.69 1.49 1.50
Upside-Down 5.02 4.58 3.41 4.34
Whitened/Blackened 4.81 5.41 5.47 5.23
3.72 3.89 3.46 3.69