2 factor ANOVA
Download
Report
Transcript 2 factor ANOVA
2 factor ANOVA
2 X 3 Dose by drug (row by column)
Drug A
Drug B
Drug C
High dose
Sample 1
Sample 2
Sample 3
Low dose
Sample 4
Sample 5
Sample 6
We would test for
1)
Mean differences between doses (factor A)
2) Mean differences between drugs (factor B)
3) Mean differences produced by the two factors acting
together - interactions
All three tests combined into one –
reduces chance of type I error.
Get three F ratios -one for each test
Total variability
Between treatments
variability
Factor A
Factor B
Interaction
Within treatments
variability
F= variance between the means for Factor A (row means)
variance expected from error
F= variance between the means for Factor B (column means)
variance expected from error
F = variance not explained by main effects
variance expected from error
What is a main effect?
• We collapse across one factor and
compare the other factor.
18 student
class
24 student
class
30 student
class
Program 1
85
80
75
80
Program 2
75
70
65
70
80
75
70
18 student
class
24 student
class
30 student
class
Program 1
85
80
75
80
Program 2
75
70
65
70
80
75
70
Interactions
• There is an interaction if the effect of one factor
depends on the level of another factor.
• The influence of one variable changes according
to the level of another variable.
• A X B interaction
Degrees of freedom
2 factor
Factor A has a levels and df= a-1
Factor B has b levels and df = b-1
Interaction df = (a-1)(b-1)
Error df = N - ab
All possible combinations of a 2 factor analysis
Yes A
Yes B
Yes AXB
Yes A
No B
Yes AXB
No A
Yes B
Yes AXB
No A
No B
Yes AXB
Yes A
Yes B
No AXB
Yes A
No A
No B
Yes B
No AXB
No AXB
No A
No B
No AXB
Example: College Drinking
There is a line connecting each level of the means for A1, A2, and A3. If we did not consider Gender,
then this line would be the main effect of A. In Panel 1, the means differ so there would be a main effect
of A. This is not the case in Panel 2.
In Panel 3, all the B1s are higher than B2. Thus, there is a main effect of B. Note that A has no effect for
B1 or B2. So there is no effect of A or an AB interaction. The latter is because A has no differential effect
dependent on B.
In Panel 4, A has an effect such that as Year increases drinking increases. Gender (B) has an effect as
the B1 line is higher than the B2 line.
Big Point Alert - The B1 line is parallel to B2 line. Year effects each Gender in the same fashion. There
is No Interaction!
In Panel 5, A has an effect such that as drinking increases with age for all groups. B has an effect, as the
B1 line is higher than the B2 line.
Big Point Alert - The B1 line is Steeper than the B2 line. Thus, the year can have a different effect
dependent on your gender. The lines are not parallel. This is an Interaction.
In Panel 6 the slopes are opposite. This is a cute one. If you compute the average for B1 vs. B2,
forgetting about Year, then there is no effect of gender. If you average the Years forgetting about Gender,
the years don't differ. You would get No main effects. There is only an Interaction. That's why we
check it first.
In testing food products for palatability, General Foods
employed a 7-point scale from -3 (terrible to +3
(excellent) with 0 representing "average".
The experiment reported here involved the effects on
palatability of a course versus fine screen and of a low
versus high concentration of a liquid component.
Mean food palatability determined by
screen size and liquid composition
Between-Subjects Factors
N
liquid
s creen
.00
1.00
.00
1.00
8
8
8
8
Descriptive Statistics
Dependent Variable: score
liquid
.00
1.00
Total
s creen
.00
1.00
Total
.00
1.00
Total
.00
1.00
Total
Mean
41.7500
36.0000
38.8750
103.5000
77.2500
90.3750
72.6250
56.6250
64.6250
Std. Deviation
25.55223
17.83255
20.62895
18.91208
15.08587
21.15884
39.01991
26.83248
33.38837
N
4
4
8
4
4
8
8
8
16
Tests of Between-Subjects Effects
Dependent Variable: score
Source
Corrected Model
Intercept
liquid
s creen
liquid * s creen
Error
Total
Corrected Total
Type III Sum
of Squares
12053.250 a
66822.250
10609.000
1024.000
420.250
4668.500
83544.000
16721.750
df
3
1
1
1
1
12
16
15
Mean Square
4017.750
66822.250
10609.000
1024.000
420.250
389.042
a. R Squared = .721 (Adjusted R Squared = .651)
F
10.327
171.761
27.270
2.632
1.080
Sig.
.001
.000
.000
.131
.319
There was a significant effect of liquid concentration on
palatability. F(1,12) = 27.27 p<.05 MS = 10609. The
higher concentration of the liquid component was
reported to be significantly more palatable than the lower
concentration.
There was no significant effect of screen size, F(1,12) =
2.632 p>.05 MS = 1024.
There was no significant interaction, F(1,12) = 1.08,
p>.05, MS = 420.25.
Reporting results of complex
design
•
•
•
•
•
•
•
•
What kind of test
description of variables and definitions of levels (conditions) of each
summary statistics for cells in design matrix (figure)
report F tests for main effects and interactions
effect size
statement of power for nonsignificant results
description of statistically significant main effect
analytical comparisons post hoc where appropriate – to clarify
sources of systematic variation
• simple post hoc effects analysis when interaction is statistically
significant
• description of statistically significant interactions – looking at cell
means
• conclusion from analysis
Total variability
Between treatments
variability
Factor A
Factor B
Interaction
Within treatments
variability
The analysis is based on the following linear model:
We will calculate F-ratios for each of these:
FA
FB
FAB
•
•
•
•
•
MS A, MS B, MS AB, & MS Within Groups
MS A estimates σ2α
MS B estimates σ2 β
MS AB estimates σ2αβ
MS Within-Groups estimates σ2ε
design