Beruflich Dokumente
Kultur Dokumente
Rejection region
Non-Null distribution
Xcrit
Null distribution
Acceptance region
Rejection region
Alternative distribution
Xcrit
Alternative distribution
Xcrit
One can reasonably conclude there is no difference between the means when
the observed F ratio is smaller than the critical value the observed F ratio is greater than the critical value the MS-within is smaller than MS-between the SS-within is greater than SS-between
Rejection of the null hypothesis in the one-way ANOVA leads to the conclusion that
each population mean is different from every other population mean all of the sample means are significantly different not all population means are equal to each other the alternate hypothesis is also rejected
6
Two-way ANOVA
Outline
Purpose Interaction Model setup Hypothesis testing Test statistics Additivity Assumptions Variance decomposition Types of sum of squares SPSS runs Power analysis Measures of association
7
Scenario 1
A researcher is interested in whether graduate students with low, medium, and high IQ differed in terms of their achievement. He classified a random sample of 300 graduate students into low, medium, and high IQ groups and test them on an achievement test. Which statistical procedure should the researcher employ to answer his research question?
A researcher is interested in investigating the effect of different levels of familiarity of text and reading perception on the level of students reading comprehension. To investigate the research question, the researcher randomly selected 25 students and randomly assigns them to one of the four treatment conditions. Familiar material which the teacher tells the student is difficult to understand (F/D) Familiar material which the teacher tells the student is easy to understand (F/E) Unfamiliar material which the teacher tells the student is difficult to understand (UF/D) Unfamiliar material which the teacher tells the student is easy to understand (UF/E) As a result of experimental mortality, the number of students within each of the treatment differs. Following the implementation of the treatments, the students comprehension of the passage that they read was assessed. The four variables in the data file are the reading comprehension scores for the four groups. 9
Scenario 2
Reanalyzing Scenario 2
A researcher is interested in investigating the effect of different levels of familiarity of text and reading perception on the level of students reading comprehension. To investigate the research question, the researcher randomly selected 25 students and randomly assigns them to one of the four treatment conditions. Familiarity of material Familiar material Unfamiliar material Easy/difficult told by teacher the teacher tells the student is difficult to understand (F/D) the teacher tells the student is easy to understand (F/E) As a result of experimental mortality, the number of students within each of the treatment differs. Following the implementation of the treatments, the students comprehension of the passage that they read was assessed. The four variables in the data file are the reading comprehension scores for the four groups.
10
Test equality of means related to each of two IVs Test the presence of interaction effects between two IVs Such effect deals with the relative magnitude of cell means
11
Margin Means of A
1. 2. ..
12
Example
Investigate whether either of 2 factors affects the DV-post operative recovery rate of children who receive tonsillectomies. Two IVs:
A: nature of pre-operative program with two levels
1). Anxiety reduction 2). Procedure orientation
Children are randomly assigned to one of the four joint levels of the two IVs.
A=1, B=1: anxiety reduction/early treatment A=1, B=2: anxiety reduction/delayed treatment A=2, B=1: procedure orientation/early treatment A=2, B=2: procedure orientation/delayed treatment
13
Mean post operative recovery rates under two time frames for pre-operative programs
Main effect B hypothesis: H0: .1= .2
Mean postoperative recovery rates under various four joint levels of pre-operative program and time of preoperative program (interaction hypothesis between treatments A and B H0: jk j.- .k + .. =0 for all 14 levels of j and k.
Interaction effects
When the values of the cells means can not be defined in terms of corresponding marginal means and grand means jk j. + .k - .. When the mean differences among the levels of one independent variable A differ from one level of a second independent variable B to another.
15
Presence of Interaction
B 1 5 3 4 2 7 11 9
A Margin Means of B
1 2
Difference between the mean of level one of A and level two of A at level one of B is equal to 11-21=5-3=2 Difference between the mean of level one of A and level two of A at level two of B is equal to 12-22=7-11=-4 There is interaction.
16
No Presence of Interaction
B 1 10 11 10.5 2 2 3 2.5
A Margin Means of B
1 2
Difference between the mean of level one of A and level two of A at level one of B is equal to 11-21=10-11=-1 Difference between the mean of level one of A and level two of A at level two of B is equal to 12-22=2-3=-1 Both are equal to difference in marginal means 1. -2. =6-7=-1
17
B1 B1 B2 A2 A1 A2 A1
B1
B1
B2 A1
B2 A2 A1 A2
B2
h
18
Types of Interaction
1. Ordinal interaction: the order of the mean magnitude on one IV does not change across the various levels of the 2nd IV
B 1 A 1 2 10 30 2 30 90 3 5 25
Mean at level one of A is smaller than the mean at level two of A for each of the levels of B- the order of the difference are the same At level one of B: 10<30 At level two of B: 30<90 At level three of B: 5<25
19
20
Types of Interaction
2. Disordinal interaction: the order of the mean magnitude on one IV changes across the various levels of the 2nd IV
1 2
B 1 10 30
2 70 50
3 20 40
Mean at level 1 of A is smaller than the mean at level 2 of A for level 1 and 3 of B but there is a reversal in the order of mean magnitude for level 2 of B At level one of B: 10<30 At level two of B: 70>50 At level three of B: 20<40
21
40 30 20 10 0 B1 B2 IV - B B3
A1 A2
22
IV, which is placed on the baseline in the graph may affect whether the line segments cross. If variable A is put on the baseline, the interaction changed from disordinal to ordinal
23
Which IV should be placed on the baseline of the graph for describing the interaction effects?
If both IV are manipulated variables, either IV may be appropriately be placed on the baseline If one of the IVs is not a manipulated variable such as gender, the non-manipulated IV should be placed on the baseline of the graph Factor with most levels put on x axis
24
No Interaction
B Margin Means of A 3 60 90 75
A Margin Means of B
1 2
1 40 70 55
2 20 50 35
40 70 55
25
No Interaction
If there is no interaction, graphs of cell means will result in parallel line segments, no matter which IV is placed on the baseline Every cell mean may be defined in terms of its marginal means and the grand mean: jk= j. + .k- .. 11= 1. + .1- .. =40+55-55=40 12= 1. + .2- .. =40+35-55=20 13= 1. + .3- .. =40+75-55=60 21= 2. + .1- .. =70+55-55=70 22= 2. + .2- .. =70+35-55=50 23= 2. + .3- .. =70+75-55=90
26
27
Economy of efforts
Simultaneous consideration of two IVs with the same subjects is more economical than using separate samples of subjects for each IV
Possible to investigate interaction effects which can not be assessed with one-way ANOVA When on IV is a blocking variable, may be able to increase the level of comparability of subjects across the levels of the manipulated IV
29
n j
Y j
Y111 Y211
1
Y112 Y212
Y11 k Y21 k
Yn11 11
Yn12 12
Y122 Y222
Yn1k 1k
Y12 k Y22 k
Cell(j,k)
n1
Y1
Y1 2 1
Y221
2 IV A
Yn21 21
Yn22 22
Yn2 k 2 k
n 2.
Y2
Yijk
Y jk
jk
2 jk
n jk Y1J 1 Y2 J 1 Y1J 2 Y2 J 2
Yn J 2 J 2
Y1 Jk Y2 Jk
YnJk Jk
Yn J 1 J 1
nJ
N
YJ
nk Yk
n1
n2
nK
Y1 1
Y2 2
YK K
30
Usually, both j and k are fixed effects. Accordingly, ()jk is a fixed effect as well. Computationally
j = j
k = k
( ) jk = jk j k +
ijk = Yijk jk
32
Statistical Hypotheses in Two-way ANOVA 1. Marginal means of A are equal, H0: 1.= 2. =, , = J. or H0: 1 = 2 = . = j = 0 for all j H1: j. j. for at least one pair of levels of A Or H1: j 0 for at least one j . 2. Marginal means of B are equal, H0: .1= .2 =, , = .K or H0: 1 = 2 = . = k = 0 for all k H1: .k .k for at least one pair of levels of B Or H1: .k 0 for at least one k . 3. Cell means may be defined in terms of marginal means and grand means, H0: jk.= j. + .k - .. for all j, k H1: jk. j. + .k - .. for at least one cell jk H0: jk.- j. - .k + .. =0 for all j and k H1: jk. -j. - .k +.. 0 for at least one cell jk H0: ()jk.= 0 for all j and k H1: ()jk . 0 for at least one cell jk
33
2 E ( MS A ) = +
n
j =1 K
2 j
J 1
2 E ( MS B ) = +
nk k2
k =1
K 1
K
2 E ( MS AB ) = +
j =1 k =1
n jk ( ) 2 jk
( J 1)( K 1)
2 E ( MS with ) =
34
MS A F= MS with
2. Main effect B
MS B F= MS with
3. Interaction effect AB
MS AB F= MS with
Elements in F statistics
Assessed effects Main Effect A Main effect B Interaction AB Within cell Total df Sum of Squares Mean Squares
df A
df B
df AB
df with
SS A
SS B SS AB
MS A
MS B
MS AB MS with MStotal
36
SS with
df total
SS total
df A = J 1
2
SS B = nk (Yk Y )
k =1
df B = K 1
2
SS AB =
k =1
n
j =1 J
jk
(Y jk Y j Yk + Y )
2
df AB = ( J 1)( K 1)
df with = N JK
SS with =
k =1
j =1 i =1
n jk
(Yijk Y jk )
2
SStotal =
k =1
j =1 i =1
n jk
(Yijk Y )
df total = N 1
37
Sum of squares and degree of freedoms are additive when njk=njk for all j, j, k, k or more generally when the cell sample sizes are the same or proportional. Cell sample sizes are proportional when njk=(nj.*n.k)/N for all j, k
df A + df B + df AB + df with = df total
SS A + SS B + SS AB + SS with = SStotal
However, when the cell sample sizes are not proportional, the additivity will not hold for sums of squares No independence among sums of squares. Thus, F statistics are not independent of one another.
38
Necessary conditions required for SSA, SSB, and SSAB to be independent The number of elements in each cell, njk, must be proportional by row and by column, or the relative magnitude of corresponding cell sample sizes must be the same, or proportionality is present if and only if njk=(nj.*n.k)/N for all j,k When all the cell sizes are equal, this is a special case in which proportionality is present
39
n =(75*160)/200=60
32
SStotal=SSA+SSB+SSAB+SSwith
Assumptions for Two-way ANOVA 1. Observations on DV are random and independent both within and across treatments
F-test is not robust to violation of this assumption
2. For each joint level of IVs A and B, scores on the DV is normally distributed
F-test is robust to the violation of this assumption if the sample size for each cell is large, njk20 for all j, k, or with balanced or nearly balanced design
3. For each joint level of IVs A and B, scores on the DV have equal variance-homogeneity of variance
H0: 112 = 122 = . = jk2 = 2 Robust if the sample sizes for each cell are equal or nearly equal or with large n 41
To investigate the research question, the researcher randomly selected 12 hyperactive children who are having problems with acting out behavior and randomly assigned 4 to each of the three behavior modification treatment regimens Following the implementation of the treatment which lasted for 6 weeks, the researcher observed the amount of acting out behavior which each child manifested during a 3 hour controlled observation period
42
43
Data layout
IV B 1 0 1 1 IV A 2 2 1 2
n j
Y j
Y11 = 0.5
2 1
Y12 = 1.5
1 2
Y1 =1
Y21 = 1.5
3 3
Y22 = 1.5
4 4
Y2 =1.5
Y31 = 3.0
6
Y32 = 4.0
6
4 N=12
YJ =3.5
Y =2
n k
Yk
Y1 =1.667
Y2 =2.333
44
df A = J 1 = 3 1 = 2
SS B = nk (Yk Y )
k =1 2
df B = K 1 = 2 1
df AB = ( J 1)( K 1) = (3 1)( 2 1) = 2
SS AB =
k =1
n jk (Y jk Y j Yk + Y ) = 2(0.5 1 1.667 + 2) 2
j =1 2
+ 2(1.5 1 1.667 + 2) 2 + 2(1.5 1.5 1.667 + 2) 2 + 2(1.5 1.5 2.333 + 2) 2 + 2(3 3.5 1.667 + 2) 2 + 2(4 3.5 2.333 + 2) = 0.667
SS with =
k =1
j =1 i =1
n jk
df with = N JK = 12 3 2 = 6
j =1 i =1
n jk
(Yijk Y ) = (0 2) 2 + (1 2) 2 + (2 2) 2 + (1 2) 2
df total = N 1 = 12 1 = 11
45
+ 2(3 2) 2 + (1 2) 2 + (2 2) 2 + (1 2) 2 + ( 2 2) 2 + 2( 4 2) 2 = 18
Within 6 Total
11
18
46
47
Making decision
Compare F-observed and F-critical
Reject the null when F-observed is equal to larger than F-critical Otherwise fail to reject the null
48
Fail to reject the null for main effect B and interaction between A and B
49
Interpretation of results
No significant interaction effects,
main effects are additive Main effects are statistically independent of one another Can make a statement about the constant added benefits of A1 over A2 regardless of the levels of B
11
18
df 2 1 2 6 11
SS 14 1.333 0.667 2 18
F-observed 21 4 1
51
SS with
SStotal
SS B = SS AB SS with
SStotal
SS-within for two-way ANOVA is often smaller than that for one-way ANOVA. The larger the difference, the greater the relative power of the two-way ANOVA for testing the hypothesis regarding the main effect A
52
One-way dfbetw =
Two-way dfA
df with
dftotal
df B = df AB df with
= dftotal
df-within for one-way ANOVA is always larger than that for two-way ANOVA. This affects both the magnitude of MS-within and the critical value of F. The larger the difference, the greater the relative power of the two-way ANOVA for testing the hypothesis regarding the main effect A
53
Controlling for A Controlling for A Controlling for A and AB Controlling for A and AB
Controlling for A and B Controlling for A and B Controlling for A and B Controlling for A and B
Type I SS should only be used in circumstances where the effects can be ordered in terms of importance. In Type II SS, the interaction is tested first. Only if the interaction is NOT significant can one go on to test the main effects. Type III SS is always recommended because its control of interaction effects in testing main effects Type IV SS is recommended when there are missing values in some cells
54
Properties for each sums of squares 1. The values for SSAB and SSwithin are the same for the four different types of sums of squares. Thus the values of the F-statistics for interaction will be the same 2. Whenever all cell sample sizes are proportional SS-Type I = SS-Type II SS-Type III = SS-Type IV 3. Whenever all cell sample sizes are equal All 4 types of SS are the same Main effect hypotheses that are tested deal with unweighted population means
55
56
57
Between-Subjects Factors Value Label mod_A 1.00 2.00 3.00 1.00 2.00 N 4 4 4 6 6
2.00
3.00
age_B
age 4 age 8
Total
58
3. mod_A * age_B Dependent Variable: act_out mod_A 1.00 2.00 3.00 age_B age 4 age 8 age 4 age 8 age 4 age 8 Mean .500 1.500 1.500 1.500 3.000 4.000 Std. Error .408 .408 .408 .408 .408 .408 95% Confidence Interval Lower Bound Upper Bound -.499 1.499 .501 2.499 .501 2.499 .501 2.499 2.001 3.999 3.001 4.999
59
a . R S q u a re d = .8 8 9 (A d ju ste d R S q u a re d = .7 9 6 )
60
61
62
63
64
65
Two-way ANOVA
Dependent variable: Attitude toward minority group following the course. Factor A: Type of beat (J = 3) 1 = upper class; 2 = middle class; 3 = inner city Factor B: Length of the course (K = 3) 1 = 5 hours; 2 = 10 hours; 3 = 15 hours Data Summary:
1 33.00 30.00 20.00 27.67 Factor B 2 35.00 31.00 40.00 35.33 3 38.00 36.00 52.00 42.00 mean 35.33 32.33 37.33 35.00
66
Factor A
1 2 3 mean
ANOVA table
SS df A 1 9 0 .0 0 0 2 B 1 5 4 3 .3 3 32 A x B 1 2 3 6 .3 3 34 W it h in 2 2 5 0 . 0 0 03 6 c e ll T o t a l 5 2 2 0 . 0 0 04 4
MS F 9 5 .0 0 0 1 .5 2 7 7 1 . 6 6 61 2 . 3 5 3 0 9 . 1 6 74 . 9 5 6 2 .5 0 0
p - va lu e 0 .2 3 2 0 .0 0 0 0 .0 0 3
67
2 = j
j =1 K
( J 1)( MS A MS with ) nK
2 = ( K 1)( MS B MS with ) k nJ k =1
( )
j =1 k =1
2 jk
2 = j
j =1 K
69
Effect Size
(partial omega-squared)
2 2 = 2 2 +
2 A =
j =1 2 J
2 j
/J
j + 2 / J
j =1
2 B =
k2 / K
k =1
+ k2 / K
2 k =1
K J
2 AB =
( ) 2jk / JK 2 + ( ) 2jk / JK
j =1 k =1 j =1 k =1 J K
J )M ( 1 S S tot +M w S S ith
w ith
Cohens guidelines: 2 = 0.010 is a small association 2 = 0.059 is a medium association 2 = 0.138 is a large association
2 A =
S S
J )M ( 1 S S tot + S w S M ith
w ith
2 B =
S S
( J ) M 1 S S tot +M with S S
A B
w ith
2 AB =
S S
( J ) M 1 S S tot +M w S S ith
w ith
71
Highlights
72
Dependent Variable: Current Salary Source Gender Degree Gender * Degree Error Sum of Squares ? ? 300 ? 3 ? 45 ? ?
73
F 11 ? ?
Dependent Variable: Current Salary Source Degree Error Sum of Squares ? ? df Mean Square 3 45 ? 250 F ?
74
Dependent Variable: Current Salary Source Gender Error ? Sum of Squares df Mean Square 1 45 110 ? F
75