Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Setting:
Comparing g > 2 groups
Numeric (quantitative) response
Independent samples
n Y +L+ n
Y 1 ,..., Y g
Y =
Yg
BSS = n 1 Y 1 Y
+ L + ng Y
df W = N g
df
= g 1
# of Cases (ni)
Consultation
Cooperation
Assent
Codecision
205
88
8
133
Y=
( )
Mean Y i
296.5
357.3
449.6
368.6
Source: R.M. Scully (1997). Policy Influence and Participation in the European Parliament, Legislative Studies Quarterly, pp.233-252.
Example: Policy/Participation in
European Parliament
i
1
2
3
4
n_i
205
88
8
133
Ybar_i
296.5
357.3
449.6
368.6
s_i
124.7
93.0
171.8
61.1
YBar_i-Ybar
BSS
WSS
-37.25
284450.313 3172218
23.55
48805.02
752463
115.85
107369.78 206606.7
34.85
161531.493 492783.7
602156.605 4624072
BSS /( g 1)
BMS
T .S . Fobs =
=
WSS /( N g ) WMS
R.R. : Fobs F , g 1, N g
P = P ( F Fobs )
BMS and WMS are the Between and Within Mean Squares
Example: Policy/Participation in
European Parliament
H0: 1 = 2 = 3 = 4
HA: The means are not all equal
BSS /( g 1)
602156.6 / 3
T .S . Fobs =
=
= 18.67
WSS /( N g ) 4624072 / 430
R.R. : Fobs F , g 1, N g = F.05,3, 430 2.60
P = P( F Fobs = 18.67) < P( F 5.42) = .001
Sum of Squares
BSS
WSS
TSS
Degrres of
Freedom
g-1
N-g
N-1
Mean Square
BMS=BSS/(g-1)
WMS=WSS/(N-g)
F
F=BMS/WMS
Estimating/Comparing Means
Estimate of the (common) standard deviation:
^
WSS
=
N g
df = N g
WMS
Y i t / 2, N g
(Y
ni
Y j t / 2, N g
1 1
+
ni n j
(Y
) t
C / 2, N g
1
1
+
ni n j
Interpretations
After constructing all g(g-1)/2 confidence
intervals, make the following conclusions:
Conclude i > j if CI is strictly positive
Conclude i < j if CI is strictly negative
Do not conclude i j if CI contains 0
Example: Policy/Participation in
European Parliament
Estimate of the common standard deviation:
^
WSS
4624072
=
= 103.7
Ng
430
Example: Policy/Participation in
European Parliament
Comparison
Y i Y
Consult vs Cooperate
Consult vs Assent
Consult vs Codecision
Cooperate vs Assent
Cooperate vs Codecision
Assent vs Codecision
296.5-357.3 = -60.8
296.5-449.6 = -153.1
296.5-368.6 = -72.1
357.3-449.6 = -92.3
357.3-368.6 = -11.3
449.6-368.6 = 81.0
1
1
+
ni n j
2.64(103.7)(0.13)=35.6
2.64(103.7)(0.36)=98.7
2.64(103.7)(0.11)=30.5
2.64(103.7)(0.37)=101.1
2.64(103.7)(0.14)=37.6
2.64(103.7)(0.36)=99.7
Confidence Interval
(-96.4 , -25.2)*
(-251.8 , -54.4)*
(-102.6 , -41.6)*
(-193.4 , 8.8)
(-48.9 , 26.3)
(-18.7 , 180.7)
Test Comparisons
i = + i
g = i = i - g
2-Way ANOVA
2 nominal or ordinal factors are believed to
be related to a quantitative response
Additive Effects: The effects of the levels of
each factor do not depend on the levels of
the other factor.
Interaction: The effects of levels of each
factor depend on the levels of the other
factor
Notation: ij is the mean response when
factor A is at level i and Factor B at j
Thalidomide/TB+: 9,6,4.5,2,2.5,3,1,1.5
Thalidomide/TB-: 2.5,3.5,4,1,0.5,4,1.5,2
Placebo/TB+: 0,1,-1,-2,-3,-3,0.5,-2.5
Placebo/TB-: -0.5,0,2.5,0.5,-1.5,0,1,3.5
ANOVA Approach
Total Variation (TSS) is partitioned into 4
components:
Factor A: Variation in means among levels of A
Factor B: Variation in means among levels of B
Interaction: Variation in means among
combinations of levels of A and B that are not due
to A or B alone
Error: Variation among subjects within the same
combinations of levels of A and B (Within SS)
ANOVA Approach
General Notation: Factor A has a levels, B has b levels
Source
Factor A
Factor B
Interaction
Error
Total
df
a-1
b-1
(a-1)(b-1)
N-ab
N-1
SS
SSA
SSB
SSAB
WSS
TSS
MS
MSA=SSA/(a-1)
MSB=SSB/(b-1)
MSAB=SSAB/[(a-1)(b-1)]
WMS=WSS/(N-ab)
F
FA=MSA/WMS
FB=MSB/WMS
FAB=MSAB/WMS
Procedure:
Test H0: No interaction based on the FAB statistic
If the interaction test is not significant, test for Factor A
and B effects based on the FA and FB statistics
7.5
Group Means
A
tb
A
Negative
Positive
3.000
A
A
A
A
A
A
A
A
A
A
2.5
0.0
-2.5
A
A
A
A
A
A
A
A
A
A
meanwg
wtgain
5.0
2.000
1.000
A
0.000
-1.000
Placebo
Thalidomide
Placebo
drug
Thalidomide
drug
Report
WTGAIN
GROUP
TB+/Thalidomide
TB-/Thalidomide
TB+/Placebo
TB-/Placebo
Total
Mean
3.688
2.375
-1.250
.688
1.375
N
8
8
8
8
32
Std. Deviation
2.6984
1.3562
1.6036
1.6243
2.6027
df
3
1
1
1
1
28
32
31
Mean Square
36.563
60.500
87.781
.781
21.125
3.583
F
10.206
16.887
24.502
.218
5.897
Sig.
.000
.000
.000
.644
.022
Regression Approach
General Procedure:
Generate a-1 dummy variables for factor A (A1,...,Aa-1)
Generate b-1 dummy variables for factor B (B1,...,Bb-1)
Model
1
(Constant)
DRUG
TB
Unstandardized
Coefficients
B
Std. Error
-.125
.627
3.313
.723
-.313
.723
Standardized
Coefficients
Beta
.647
-.061
t
-.200
4.579
-.432
Sig.
.843
.000
.669
dummy variables
Model:
E(Y) = + 1A1 +L+ a1Aa1 + a B1 +L+ a+b2Bb1 + a+b1(A1B1) +L+ ab1(Aa1Bb1)
As with the ANOVA approach, we can partition the variation
to that attributable to Factor A, Factor B, and their interaction
Model
1
(Constant)
DRUG
TB
DRUGTB
Unstandardized
Coefficients
B
Std. Error
.687
.669
1.688
.946
-1.937
.946
3.250
1.338
Standardized
Coefficients
Beta
.329
-.378
.549
t
1.027
1.783
-2.047
2.428
Sig.
.313
.085
.050
.022
dfTO = N 1
df BL = b 1
dfTR = g 1
df
g-1
b-1
(g-1)(b-1)
gb-1
SS
SSTR
SSBL
SSE
SSTO
MS
MSTR=SSTR/(g-1)
MSBL=SSBL/(b-1)
MSE=SSE/[(g-1)(b-1)]
F
F=MSTR/MSE
t
Obtain the critical quantity:
b
Obtain the simultaneous confidence intervals for
all pairs of means (with standard interpretations):
C
(T
T j t
2
b
df
SS
MS
g-1
N-g
SSTrt
SSE1
MSTrt=SSTrt/(g-1)
MSE1=SSE1/(N-g)
MSTrt/MSE1
t-1
(t-1)(g-1)
(N-g)(t-1)
SSTi
SSTiTrt
SSE2
MSTi=SSTi/(t-1)
MSTiTrt=SSTiTrt/((t-1)(g-1))
MSE2=SSE2/((N-g)(t-1))
MSTi/MSE2
MSTiTrt/MSE2
(T
T j t / 2, N g
1
1
MSE1 +
tn tn
j
i