Transcript document

Factorial Analysis of
Variance
46-511
Between Groups Fixed Effects Designs
1
Two-Way ANOVA Example:
(Yerkes – Dodson Law)
Factor A: Task Difficulty
Factor B: Arousal
Easy
Difficult
Low
Medium
High
3
1
1
6
4
5
5
9
7
7
9
9
13
6
8
0
2
0
0
3
3
8
3
3
3
0
0
0
5
0
2
Partitioning Variance
Factor A: Task Difficulty
Factor B: Arousal
Easy
Difficult
Low
Medium
High
3
…
4
5
…
7
9
…
8
0
…
3
3
…
3
0
…
0
Variation among means on B
represents effect of B
Leftover variation = interaction
Variation
among
means on A
represent
effect of A
Variation among
people treated the
same = error
3
Partitioning Variance: Interaction
Factor A: Task Difficulty
Factor B: Arousal
Low
Medium
High
Total
Easy
3.00
6.00
9.00
6.00
Difficult
1.00
4.00
1.00
2.00
Total
2.00
3.00
5.00
4.00
Dependence of means on levels of both A & B represents the
effect of an interaction.
4
Or Graphically…
10
9
8
7
6
Easy
5
Difficult
4
3
2
1
0
Low
Medium
High
5
In words
 Types of Effects vs. 1-way
 Main Effect for A
 Main Effect for B
 Interaction (A x B)
 Structural Model: XIJK = μ++++IJK
 Partitioning Variance/Sums of Squares

First, total variance:

Between Groups:

Thus Total is:
SSTOT  SS BG  SSW
SSBG  SS A  SSB  SS AXB
SSTOT  SS A  SS B  SS AXB  SSW
6
Sums of Squares Between
Definitional Formula
___
SS BG  n ( AB ij  G )
2
Variation of cell
means around grand
mean, weighted by n.
Computational Formula
2
SS BG
2
T
G


n
N
Computational formulae:
•More accurate for hand
calculation
•Easier to work
•Less intuitive
7
Sums of Squares A
Definitional Formula
_
_
SS A  nq  ( Ai  G )
Computational Formula
2
Variation of row
means around grand
mean, weighted by n
times the number of
levels of B, or q.
2
ROW
T
G2
SS A  

nROW N
8
Sums of Squares B
Definitional Formula
_
_
SS B  np  ( B j  G )
2
Computational Formula
Variation of column
means around grand
mean, weighted by n
times the number of
levels of A, or p.
2
TCOL
G2
SS B  

nCOL N
9
Sums of Squares AxB
Definitional Formula
SS AxB  n( ABij  Ai  B j  G)
2
Computational Formula
SS AB  SS Between  SS A  SS B
SSAxB = Variation of cell means around grand mean, that
cannot be accounted for by effects of A or B alone.
10
Sums of Squares Within (Error)
Definitional Formula
SSW  ( X ijk  ABij )
2
Computational Formula
2
T
SSW  X  
n
2
ijk
SSW = Variation of individual scores around cell mean.
11
Numerical Example
Easy
T
Mean
SS
Effect of Task Difficulty and Anxiety Level on Performance
Low
Medium
High Marginals for B
3
2
9
1
5
9
1
9
13 T
6
7
6 Mean
4
7
8 SS
15
30
45
3
6
9
18
28
26
Difficult
T
Mean
SS
Marginal for A
T
Mean
SS
0
2
0
0
3
5
1
8
3
8
3
3
3
20
4
20
20
2
36
50
5
58
0
0
0T
5 Mean
0 SS
5
1
20
50
5
206
90
6
162
30
2
78
12
Degrees of Freedom
 df between = k – 1; or, (kA x kB – 1)
 df A = kA – 1
 df B = kB – 1
 df A x B = dfbetween – dfA – dfB
 dfW = k(n-1)
13
Source Table
Source
SS
df
MS
F
Between
A
B
AxB
Within
Total
14
More Digression on Interactions
 Ways to talk about interactions




Scores on the DV depend upon levels of both
A and B
The effect of A is moderated by B
The effect of B is moderated by A
There is a multiplicative effect for A and B
15
More Digresions (cont’d)
No effect whatsoever…
No Significant Effects
Interaction Effect: Cell & Marginal Means
B: Anxiety
A: Task Difficulty
Low
Medium
Easy
4
4
Hard
4
4
Totals
4
4
High
4
4
4
Totals
4
4
4
Deviations: cell mean - row mean - column mean + grand mean
Anxiety
Task Difficulty
Low
Medium
High
Easy
0
0
0
Hard
0
0
0
Interaction Sum of Squares:
Main Effect for A
Main Effect for B
0
0
0
16
Main effects for A and B…
Only Main Effects Significant
Interaction Effect: Cell & Marginal Means
B: Anxiety
A: Task Difficulty
Low
Medium
Easy
3
6
Hard
1
4
Totals
2
5
High
9
7
8
Totals
6
4
5
Deviations: cell mean - row mean - column mean + grand mean
Anxiety
Task Difficulty
Low
Medium
High
Easy
0
0
0
Hard
0
0
0
Interaction Sum of Squares:
Main Effect for A
Main Effect for B
0
30
180
17
Graphically…
2-Way ANOVA Anxiety by Task Difficulty: Main Effects, No Interaction
10
9
8
Performance
7
6
Easy
Hard
5
4
3
2
1
0
Low
Medium
High
Anxiety Level
18
Interaction significant also…
Significant Interaction
Interaction Effect: Cell & Marginal Means
B: Anxiety
A: Task Difficulty
Low
Medium
Easy
3
6
Hard
1
4
Totals
2
5
High
9
1
5
Totals
6
2
4
Deviations: cell mean - row mean - column mean + grand mean
Anxiety
Task Difficulty
Low
Medium
High
Easy
-1
-1
2
Hard
1
1
-2
Interaction Sum of Squares:
Main Effect for A
Main Effect for B
60
120
60
19
Graphically…
2-Way ANOVA Anxiety by Task Difficulty: Main Effects AND Interaction
10
9
8
Performance
7
6
Easy
Hard
5
4
3
2
1
0
Low
Medium
High
Anxiety Level
20
Further Analyses on Main Effects
 Contrasts
 Planned Comparisons
 Post-Hoc Methods
 In the presence of a significant interaction
21
Further Analyses on Interaction
 What it means
 Simple (Main) Effects

Contrasts
 Partial Interactions

Contrasts
 Simple Comparisons / Post-Hoc Methods

How to get q
22
Simple Main Effects Analysis
Low
Medium
High
Total
Easy
3.00
6.00
9.00
6.00
Difficult
1.00
4.00
1.00
2.00
Total
2.00
3.00
5.00
4.00
23
Simple Main Effects
Sum of Squares Formula:
F Ratio:
SS J 
Tij2 at _ rj
Fc 
n

T j2
nj
MS j
MSW
df = dfj,dfw:
24
Partial Interaction Analysis
Low
Medium
High
Total
Easy
3.00
6.00
9.00
6.00
Difficult
1.00
4.00
1.00
2.00
Total
2.00
3.00
5.00
4.00
25
In Class Exercise
Drug
B1 (no dose)
B2 (low dose)
B3 (high dose)
A1 (no dose)
5
7
5
6
8
9
10
7
6
5
4
8
4
5
9
A2 (low dose)
5
5
4
6
8
7
8
4
5
6
5
4
3
9
7
A3 (high dose)
8
9
7
8
6
12
11
15
13
10
18
17
19
20
20
26
Based on two pieces of information
1)
De scri ptive Statistics
Dependent Variable: anxiet y
FactorA
1.00
2.00
3.00
Total
FactorB
1.00
2.00
3.00
Total
1.00
2.00
3.00
Total
1.00
2.00
3.00
Total
1.00
2.00
3.00
Total
Mean
6.2000
7.4000
6.0000
6.5333
5.6000
6.0000
5.6000
5.7333
7.6000
12.2000
18.8000
12.8667
6.4667
8.5333
10.1333
8.3778
St d. Deviation
1.30384
2.07364
2.34521
1.92230
1.51658
1.58114
2.40832
1.75119
1.14018
1.92354
1.30384
4.95504
1.50555
3.24844
6.63181
4.51406
N
5
5
5
15
5
5
5
15
5
5
5
15
15
15
15
45
27
Compute simple main effects
2)
Tests of Between-Subjects Effects
Dependent Variable: anxiety
Source
Corrected Model
Intercept
FactorA
FactorB
FactorA * FactorB
Error
Total
Corrected Total
Type III Sum
of Squares
781.378b
3158.422
458.178
101.378
221.822
115.200
4055.000
896.578
df
8
1
2
2
4
36
45
44
Mean Square
97.672
3158.422
229.089
50.689
55.456
3.200
F
30.523
987.007
71.590
15.840
17.330
Sig.
.000
.000
.000
.000
.000
Partial Eta
Squared
.872
.965
.799
.468
.658
Noncent.
Parameter
244.181
987.007
143.181
31.681
69.319
Observed
a
Power
1.000
1.000
1.000
.999
1.000
a. Computed using alpha = .05
b. R Squared = .872 (Adjus ted R Squared = .843)
28
3-Way ANOVA
 Effects







A
B
C
AxB
AxC
BxC
AxBxC
 A Vague Example




DV = Treatment Outcome
Factor A: Gender
Factor B: Age (14 or 17)
Factor C: Treatment
29
Results
Tests of Between-Subjects Effects
Dependent Variable: SCORE
Source
Corrected Model
Intercept
SEX
AGE
TREAT
SEX * AGE
SEX * TREAT
AGE * TREAT
SEX * AGE * TREAT
Error
Total
Corrected Total
Type III Sum
of Squares
221.556 b
2635.111
.111
36.000
24.889
.111
80.889
4.667
74.889
217.333
3074.000
438.889
df
11
1
1
1
2
1
2
2
2
24
36
35
Mean Square
20.141
2635.111
.111
36.000
12.444
.111
40.444
2.333
37.444
9.056
F
2.224
290.994
.012
3.975
1.374
.012
4.466
.258
4.135
Sig.
.049
.000
.913
.058
.272
.913
.022
.775
.029
Partial Eta
Squared
.505
.924
.001
.142
.103
.001
.271
.021
.256
Noncent.
Parameter
24.466
290.994
.012
3.975
2.748
.012
8.933
.515
8.270
Obs erved
a
Power
.804
1.000
.051
.482
.266
.051
.710
.086
.674
a. Computed using alpha = .05
b. R Squared = .505 (Adjusted R Squared = .278)
30
Significant Two-Way Interaction
31
Significant Three-Way Interaction
32
Other Stuff
 Higher order models (4-way, 5-way, etc.)
 Unequal Cell Sizes and SS Type
 Use of contrast coefficients
 Short-Cuts using SPSS
 Custom Models in SPSS
 Observed Power
33