Professional Documents
Culture Documents
STAT3010: Lecture 10
Adoptive Parents
High
High
Biological
Parents
Low
131
93
120
87
127
105
111
71
68
88
118
106
85
98
117
94
111
87
99
101
Low
94
130
108
81
100
74
69
87
99
106
112
69
79
98
66
73
65
109
H
H
H
H
H
H
H
H
H
H
L
L
L
L
L
L
L
L
H
H
H
H
H
H
H
H
H
H
L
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
L
L
L
L
L
L
L
L
L
L
L
STAT3010: Lecture 10
98
74
66
69
73
87
65
99
109
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
;
proc glm ;
class adoptive biological ;
model IQ = adoptive biological adoptive*biological ;
lsmeans adoptive*biological/stderr;
run ;
SAS OUTPUT:
The SAS System
The GLM Procedure
Class Level Information
Class
adoptive
biological
Levels
2
2
Values
H L
H L
38
38
DF
3
34
37
Sum of
Squares
1933.03553
10973.17500
12906.21053
Coeff Var
18.77528
Mean Square
644.34518
322.74044
Root MSE
17.96498
F Value
2.00
Pr > F
0.1330
IQ Mean
95.68421
Source
adoptive
biological
adoptive*biological
DF
1
1
1
Type I SS
1126.716082
285.694444
520.625000
Mean Square
1126.716082
285.694444
520.625000
F Value
3.49
0.89
1.61
Pr > F
0.0703
0.3534
0.2127
Source
DF
Type III SS
Mean Square
F Value
Pr > F
1
1
1
972.0132353
331.8014706
520.6250000
972.0132353
331.8014706
520.6250000
3.01
1.03
1.61
0.0917
0.3178
0.2127
adoptive
biological
adoptive*biological
STAT3010: Lecture 10
adoptive
biological
H
H
L
L
H
L
H
L
IQ LSMEAN
Standard
Error
Pr > |t|
100.100000
101.600000
97.375000
84.000000
5.681025
5.681025
6.351579
5.681025
<.0001
<.0001
<.0001
<.0001
Step 1:
Interaction Effect hypothesis:
Test Statistic:
Decision:
Conclusion:
Step 2:
Main Effects hypotheses:
Test Statistics:
Decisions:
Conclusions:
STAT3010: Lecture 10
Example:
Consider the following set of data taken from Afifi and Azen
(1972, p166). The authors present a balanced experiment
where is was desired to evaluate the effect of 4 drugs crossed
with 3 experimentally induced diseases. Each drug-disease
combination was applied to 6 randomly selected dogs. The
measurement (y) to be analyzed was the increase is systolic
blood pressure (mmHg) due to the treatment.
Drug
Disease
42
28
24
44
36
23
13
34
29
22
19
42
-2
22
13
19
15
33
27
34
11
12
26
33
12
31
-5
33
16
21
36
-6
15
31
21
22
-3
26
28
25
25
32
25
12
24
16
STAT3010: Lecture 10
SAS CODE:
options ps=62 ls=80;
title 'Unbalanced Two-Way Analysis of Variance';
data dog;
input drug disease @;
do i=1 to 6;
input y @;
output;
end;
datalines;
1 1 42 44 36 13 19 22
1 2 33 . 26 . 33 21
1 3 31 -3 . 25 25 24
2 1 28 . 23 34 42 13
2 2 . 34 33 31 . 36
2 3 3 26 28 32 4 16
3 1 . . 1 29 . 19
3 2 . 11 9 7 1 -6
3 3 21 1 . 9 3 .
4 1 24 . 9 22 -2 15
4 2 27 12 12 -5 16 15
4 3 22 7 25 5 12 .
run;
PROC GLM;
class drug disease;
model y=drug disease drug*disease / ss1 ss2 ss3 ss4;
run;
SAS OUTPUT:
Unbalanced Two-Way Analysis of Variance
The GLM Procedure
Class Level Information
Class
drug
disease
Levels
4
3
Values
1 2 3 4
1 2 3
72
58
STAT3010: Lecture 10
Source
Model
Error
Corrected Total
R-Square
0.456024
DF
11
46
57
Sum of
Squares
4259.338506
5080.816667
9340.155172
Coeff Var
55.66750
Mean Square
387.212591
110.452536
Root MSE
10.50964
F Value
3.51
Pr > F
0.0013
y Mean
18.87931
Source
drug
disease
drug*disease
DF
3
2
6
Type I SS
3133.238506
418.833741
707.266259
Mean Square
1044.412835
209.416870
117.877710
F Value
9.46
1.90
1.07
Pr > F
<.0001
0.1617
0.3958
Source
drug
disease
drug*disease
DF
3
2
6
Type II SS
3063.432863
418.833741
707.266259
Mean Square
1021.144288
209.416870
117.877710
F Value
9.25
1.90
1.07
Pr > F
<.0001
0.1617
0.3958
Source
drug
disease
drug*disease
DF
3
2
6
Type III SS
2997.471860
415.873046
707.266259
Mean Square
999.157287
207.936523
117.877710
F Value
9.05
1.88
1.07
Pr > F
<.0001
0.1637
0.3958
Source
drug
disease
drug*disease
DF
3
2
6
Type IV SS
2997.471860
415.873046
707.266259
Mean Square
999.157287
207.936523
117.877710
F Value
9.05
1.88
1.07
Pr > F
<.0001
0.1637
0.3958
Test Statistic:
Decision:
Conclusion:
STAT3010: Lecture 10
Test Statistic:
Decision:
Conclusion:
Test Statistic:
Decision:
Conclusion:
STAT3010: Lecture 10
drug
1
2
3
4
y LSMEAN
LSMEAN
Number
25.9944444
26.5555556
9.7444444
13.5444444
1
2
3
4
1
1
2
3
4
0.9989
0.0016
0.0107
2
0.9989
3
0.0016
0.0011
0.0011
0.0071
0.7870
Explanation:
4
0.0107
0.0071
0.7870
STAT3010: Lecture 10
x .1 , x .2 ,..., x . J
as well as each
x1. , x 2. ,..., x I .
and the
x ..
The quantity
i x i. x ..
The quantity
j x . j x ..
Ho :i j 0
| i j | q I ,IJ ( K 1),
MSE
JK
is rejected at level .
MSE
q
For every pair of levels i and j for which
,
i
j
J , IJ ( K 1),
IK
the null hypothesis H o : i j 0 is rejected at level .
*Using Table B.6 for the critical value in above formulas*
10