Two Way Anova
Two Way Anova
Two Way Anova
Statistics
Spring 2005
Terminology
2-Way ANOVA means
2 independent variables
1 dependent variable
3X4 ANOVA means
2 independent variables
1 dependent variable
one IV has 3 levels
one IV has 4 levels
HYPOTHESES TESTED
in 2-WAY ANOVA
No differences for IV #1 (A - 3 levels) These are
H0: MA1 = MA2 = MA3 called
“Main
No differences for IV #2 (B - 4 levels) Effects”
H0: MB1 = MB2 = MB3 = MB4
No interaction
At least one MAiBj MAmBn
EXAMPLE
One might suspect that level of
education and gender both have
significant impacts on salary. Using the
data found in
Census90 condensed.sav
determine if this statement is true.
NOTE: Use
this method of
analysis when
both IV’s are
not repeated
measures.
Estimated Marginal Means of Wage or salary incom
70000
60000
50000
Estimated Marginal Means
40000
30000
20000 Sex
10000 Male
0 Female
<= 9th grade HS diploma Bachelors Degree
HS - no diploma Some college Graduate Degree
EDUCAT
Tests of Between-Subjects Effects
Table 1
Results of the 2-way ANOVA (Gender X Education) for Income.
Source SS df MS F p
Gender 12,142,860,574 1 12,142,860,574 28.95 0.000
Education 28,840,936,475 5 5,768,187,295 13.75 0.000
Gender X Education 6,215,428,787 5 1,243,085,757 2.96 0.012
Residual 197,550,969,717 471 419,428,810
HYPOTHESES TESTED
for a 2X6 ANOVA
No differences for GENDER
(2 levels)
H0: MMale = MFemale
Reject H0
No differences for EDUCATION
(F(1,471)=29.95: p=.000) (6 levels)
H0: MB1 = MB2 = MB3 = MB4 =
Reject H0 MB5 = MB6
(F(5,471)=13.75: p=.000) No interaction
At least one MAiBj MAmBn
Reject H0
(F(5,471)=2.96: p=.012)
Types of 2-Way ANOVA designs
41.6
41.4
Estimated Marginal Means
41.2
DAY
41.0
1
40.8 2
1 2
TRIAL
Tests of Within-Subjects Effects
Measure: MEASURE_1
Type III Sum
Source of Squares df Mean Square F Sig.
DAY Sphericity Assumed .443 1 .443 .214 .647
Greenhouse-Geisser .443 1.000 .443 .214 .647
Huynh-Feldt .443 1.000 .443 .214 .647
Lower-bound .443 1.000 .443 .214 .647
Error(DAY) Sphericity Assumed 64.123 31 2.068
Greenhouse-Geisser 64.123 31.000 2.068
Huynh-Feldt 64.123 31.000 2.068
Lower-bound 64.123 31.000 2.068
TRIAL Sphericity Assumed 2.872 1 2.872 1.971 .170
Greenhouse-Geisser 2.872 1.000 2.872 1.971 .170
Huynh-Feldt 2.872 1.000 2.872 1.971 .170
Lower-bound 2.872 1.000 2.872 1.971 .170
Error(TRIAL) Sphericity Assumed 45.178 31 1.457
Greenhouse-Geisser 45.178 31.000 1.457
Huynh-Feldt 45.178 31.000 1.457
Lower-bound 45.178 31.000 1.457
DAY * TRIAL Sphericity Assumed 5.686 1 5.686 4.719 .038
Greenhouse-Geisser 5.686 1.000 5.686 4.719 .038
Huynh-Feldt 5.686 1.000 5.686 4.719 .038
Lower-bound 5.686 1.000 5.686 4.719 .038
Error(DAY*TRIAL) Sphericity Assumed 37.351 31 1.205
Greenhouse-Geisser 37.351 31.000 1.205
Huynh-Feldt 37.351 31.000 1.205
Lower-bound 37.351 31.000 1.205
Measure: MEASURE_1
Transformed Variable: Average
Type III Sum
Source of Squares df Mean Square F Sig.
Intercept 218728.237 1 218728.237 1867.847 .000
Error 3630.156 31 117.102
Table 2
Summary of the 2X2 repeated measures ANOVA (Day X Trial) for the test
data.
Source SS df MS F p
Subjects 3630.16 31 117.10
DAY 0.44 1 0.44 0.21 0.647
Error(DAY) 64.12 31 2.07
TRIAL 2.87 1 2.87 1.97 0.17
Error(TRIAL) 45.18 31 1.46
DAY * TRIAL 5.69 1 5.69 4.72 0.038
Residual 37.35 31 1.21
One IV is between subjects, other IV is within
subjects
Analyze General Linear Model Repeated Measures
Estimated Marginal Means of MEASURE_1
42.5
42.0
41.5
Estimated Marginal Means
41.0
SEX
40.5
Female
40.0 Male
1 2
TRIAL
Tests of Within-Subjects Effects
Measure: MEASURE_1
Type III Sum
Source of Squares df Mean Square F Sig.
TRIAL Sphericity Assumed 8.144 1 8.144 4.773 .037
Greenhouse-Geisser 8.144 1.000 8.144 4.773 .037
Huynh-Feldt 8.144 1.000 8.144 4.773 .037
Lower-bound 8.144 1.000 8.144 4.773 .037
TRIAL * SEX Sphericity Assumed .159 1 .159 .093 .762
Greenhouse-Geisser .159 1.000 .159 .093 .762
Huynh-Feldt .159 1.000 .159 .093 .762
Lower-bound .159 1.000 .159 .093 .762
Error(TRIAL) Sphericity Assumed 51.193 30 1.706
Greenhouse-Geisser 51.193 30.000 1.706
Huynh-Feldt 51.193 30.000 1.706
Lower-bound 51.193 30.000 1.706
Measure: MEASURE_1
Transformed Variable: Average
Type III Sum
Source of Squares df Mean Square F Sig.
Intercept 108429.072 1 108429.072 2027.326 .000
SEX 23.134 1 23.134 .433 .516
Error 1604.514 30 53.484
Table 3.
Analysis of the 2X2 ANOVA (Gender x Trial) with repeated
measures on the second factor for the test data.
Source SS df MS F p
SEX 23.13 1 23.13 0.43 0.516
Error 1604.51 30 53.48
TRIAL 8.14 1 8.14 4.77 0.037
TRIAL * SEX 0.16 1 0.16 0.09 0.762
Residual 51.19 30 1.71
Table 1
Results of the 2-way ANOVA (Gender X Education) for Income.
Source SS df MS F p
Gender 12,142,860,574 1 12,142,860,574 28.95 0.000
Education 28,840,936,475 5 5,768,187,295 13.75 0.000
Gender X Education 6,215,428,787 5 1,243,085,757 2.96 0.012
Residual 197,550,969,717 471 419,428,810
Table 2
Summary of the 2X2 repeated measures ANOVA (Day X Trial) for the test
data.
Source SS df MS F p
Subjects 3630.16 31 117.10
DAY 0.44 1 0.44 0.21 0.647
Error(DAY) 64.12 31 2.07
TRIAL 2.87 1 2.87 1.97 0.17
Error(TRIAL) 45.18 31 1.46
DAY * TRIAL 5.69 1 5.69 4.72 0.038
Residual 37.35 31 1.21
Table 3.
Analysis of the 2X2 ANOVA (Gender x Trial) with repeated
measures on the second factor for the test data.
Source SS df MS F p
SEX 23.13 1 23.13 0.43 0.516
Error 1604.51 30 53.48
TRIAL 8.14 1 8.14 4.77 0.037
TRIAL * SEX 0.16 1 0.16 0.09 0.762
Residual 51.19 30 1.71
HYPOTHESES TESTED
in 2-WAY ANOVA