9 EXAMPLE: TWO-WAY TREATMENT STRUCTURE WITH UNEQUAL VARIANCES
Tải bản đầy đủ - 0trang
18
Analysis of Messy Data, Volume III: Analysis of Covariance
TABLE 14.11
Cutting Tool Data Ran at Different Feed Rates and Speeds with Roughness
the Dependent Variable and Hardness the Possible Covariate
Speed 100 rpm
Speed 200 rpm
Speed 400 rpm
Speed 800 rpm
Feed
Rate Roughness Hardness Roughness Hardness Roughness Hardness Roughness Hardness
0.01
50
61
65
59
84
64
111
50
0.01
53
65
55
44
104
70
142
52
0.01
56
57
59
52
73
50
147
47
0.01
41
43
55
46
89
55
135
44
0.01
44
46
62
56
89
58
134
62
0.01
43
51
63
59
87
55
148
53
0.01
42
41
67
66
84
58
162
68
0.01
48
53
59
48
83
56
139
65
0.02
0.02
0.02
0.02
0.02
0.02
0.02
0.02
64
61
64
62
65
58
72
63
54
58
60
57
60
50
67
63
81
81
70
61
67
71
79
69
65
53
43
48
43
44
69
40
108
118
136
109
101
104
93
104
41
67
69
69
61
62
44
62
192
152
190
166
167
152
139
188
68
49
46
46
65
45
64
60
0.04
0.04
0.04
0.04
0.04
0.04
0.04
0.04
97
79
86
90
92
74
92
82
62
48
55
54
59
42
57
44
103
105
121
101
107
103
102
108
61
53
69
50
61
57
57
63
123
137
153
137
111
131
137
155
41
41
64
58
50
46
42
68
197
216
190
187
212
211
207
220
59
46
55
58
63
47
40
64
0.08
0.08
0.08
0.08
0.08
0.08
0.08
0.08
141
142
132
119
147
119
145
147
66
61
49
41
69
42
57
63
158
154
166
159
164
171
162
163
56
49
59
55
65
68
64
68
192
195
180
187
210
174
204
198
69
57
52
56
62
44
63
48
279
293
266
303
281
256
289
287
55
52
52
69
61
41
58
47
in the hardness values of the bar stock used in the experiment; thus the hardness of
each piece of bar was measured to be used as a possible covariate. A model to
describe the linear relationship between roughness and hardness (plot the data to
see if this is an adequate assumption) is
© 2002 by CRC Press LLC
Analysis of Covariance Models with Heterogeneous Errors
19
y ijk + α ij + βij x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
ε ijk ~ N 0, σ ij2
(14.2)
)
where yijk denotes the roughness measure, xijk denotes the hardness values, and αij
and βij denote the intercept and slope of the simple linear regression model for ith
level of speed and the jth level of feed rate. The cell variances are displayed in
Table 14.12 and since all of the cells are based on eight observations Hartley’s Max-F
test can be used to test for the equality of variances. The Max-Fvalue is 457.98/1.21 =
378.50. The .01 percentage point from the Max-F distribution for 16 treatments and
seven degrees of freedom per variance is 30.5. Thus there is sufficient evidence to
conclude that the variances are not equal. The first PROC GLM code in Table 14.12
is used to fit Model 14.2 to the data and compute the residuals, and the second PROC
GLM code is used to compute the value of Levene’s statistic. The results are in the
middle of Table 14.12. Levene’s approach has been extended to the two-way treatment structure by fitting a factorial treatment structure to the absolute value of the
residuals instead of just a one-way treatment structure. The results show that there
are unequal variances (use the F-value for Model) and that the levels of rpm are
contributing the most to the unequal variances while the levels of feed and the
interaction between the levels of feed and the levels of rpm contribute less. The
LSMEANS statement was used to provide multiple comparisons among the rpm
means of the absolute values of the residuals using an LSD type of approach. The
lower part of Table 14.12 are the significance levels of the pairwise comparisons
between the rpm means. The means of 1 and 2 are not different, but all other
comparisons are significantly different. The means of the absolute values of the
residuals for the levels of feed are also presented, but they are not significantly
different. The results in Table 14.12 indicate the variances are unequal for the levels
of speed (denoted by rpm) and are not unequal for the other parts of the treatment
structure. One possible simplification is to group rpm levels of 100 and 200 and fit
a three variance model, but that was not considered here. The PROC MIXED code
in Table 14.13 fits Model 14.2 with unequal variances for all combinations of the
levels of feed and the levels of rpm as specified by
“repeated/group=feed*rpm;”
The results in Table 14.13 consist of the list of estimated variances for each cell (as
also shown in Table 14.12) and the information criteria. For this model, the value
of AIC is 780.6. Model 14.2 with unequal variances for each level of rpm is
y ijk + α ij + βij x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
ε ijk ~ N 0, σ i2
© 2002 by CRC Press LLC
)
(14.3)
20
Analysis of Messy Data, Volume III: Analysis of Covariance
TABLE 14.12
Treatment Combination Variances and PROC GLM Code
to Compute the Residuals and to Compute Levene’s Type
Tests of Equality of Variances for the Cutting Tool Data Set
proc glm data=res;
class feed rpm; model rough=feed|rpm rpm*hard*feed;
output out=res r=r;
data res; set res; absr=abs(r);
proc glm data=res;; class feed rpm; model
absr=feed|rpm;
lsmeans feed|rpm/pdiff;
Variances
rpm=100
rpm=200
rpm=400
rpm=800
Feed=.01
9.76
1.21
30.87
211.48
Feed=.02
6.29
29.49
135.55
457.98
Feed=.04
7.47
16.06
140.85
173.04
Feed=.08
21.61
10.69
108.85
127.78
df
15
112
127
SS
2182.3828
2406.1654
4588.5482
MS
145.4922
21.4836
FValue
6.77
ProbF
0.0000
df
3
3
9
SS(III)
152.8896
1783.3713
246.1220
MS
50.9632
594.4571
27.3469
FValue
2.37
27.67
1.27
ProbF
0.0742
0.0000
0.2594
Effect
Feed
Feed
Feed
Feed
Feed
0.01
0.02
0.04
0.08
LSMean
4.4171
7.4871
5.7339
5.6678
Effect
rpm
rpm
rpm
rpm
Rpm
100
200
400
800
LSMean
2.3131
2.4260
7.2930
11.2737
_1
_2
0.9225
_3
0.0000
0.0001
_4
0.0000
0.0000
0.0008
Source
Model
Error
Corrected Total
Source
Feed
rpm
Feed*rpm
RowName
1
2
3
4
0.9225
0.0000
0.0000
0.0001
0.0000
0.0008
which is fit by the PROC MIXED code in Table 14.14. The results consist of the
four estimated variances for the levels of rpm and the associated information criteria.
The value of the AIC is 777.7, indicating that the four variance model is fitting the
© 2002 by CRC Press LLC
Analysis of Covariance Models with Heterogeneous Errors
21
TABLE 14.13
PROC MIXED Code to Fit a Model with Unequal Variances for Each
Feed*rpm Combination with the Results Including the Information Criteria
proc mixed data=twoway cl covtest ic;
class feed rpm;
model rough=feed|rpm hard*feed*rpm/ddfm=satterth;
repeated/group=rpm*feed;
CovParm
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Residual
Group
Feed*rpm 0.01
Feed*rpm 0.01
Feed*rpm 0.01
Feed*rpm 0.01
Feed*rpm 0.02
Feed*rpm 0.02
Feed*rpm 0.02
Feed*rpm 0.02
Feed*rpm 0.04
Feed*rpm 0.04
Feed*rpm 0.04
Feed*rpm 0.04
Feed*rpm 0.08
Feed*rpm 0.08
Feed*rpm 0.08
Feed*rpm 0.08
Neg2LogLike
748.6
Effect
Feed
rpm
Feed*rpm
Hard*Feed*rpm
Estimate
9.76
1.21
30.87
211.48
6.29
29.49
135.55
457.98
7.47
16.06
140.85
173.04
21.61
10.69
108.85
127.78
StdErr
5.63
0.70
17.82
122.10
3.63
17.03
78.26
264.42
4.31
9.27
81.32
99.91
12.48
6.17
62.84
73.77
ZValue
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
1.73
Lower
4.05
0.50
12.82
87.81
2.61
12.25
56.29
190.17
3.10
6.67
58.49
71.85
8.98
4.44
45.20
53.06
Upper
47.33
5.86
149.67
1025.47
30.49
143.01
657.31
2220.80
36.24
77.87
682.98
839.10
104.81
51.84
527.82
619.61
Parameters
16
AIC
780.6
AICC
787.5
HQIC
799.2
BIC
826.3
CAIC
842.3
NumDF
3
3
9
16
DenDF
24.6
28.7
18.9
6
FValue
15.66
20.68
1.18
17.67
ProbF
0.0000
0.0000
0.3592
0.0010
100
200
400
800
100
200
400
800
100
200
400
800
100
200
400
800
variance structure of the data as well as the sixteen variance structure. Also included
in Table 14.14 is the statistic to test the slopes equal to zero hypothesis which is the
F statistic corresponding to Hard*Feed*rpm. The resulting significance level is
0.0000, indicating there is sufficient evidence to believe that the slopes are not all
equal to zero.
The PROC MIXED code in Table 14.15 fits the model
(
) (
)
y ijk = µ + τ i + γ j + δ ij + λ + ρi + φ j + θij x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
)
ε ijk ~ N 0, σ i2 ,
© 2002 by CRC Press LLC
(14.4)
22
Analysis of Messy Data, Volume III: Analysis of Covariance
TABLE 14.14
PROC MIXED Code to Fit a Model with Unequal Variances for Each
Level of rpm for the Cutting Tool Study
proc mixed data=twoway cl covtest ic;
class feed rpm;
model rough=feed|rpm hard*rpm*feed/ddfm=satterth;
repeated/group=rpm;
CovParm
Residual
Residual
Residual
Residual
Neg2LogLike
769.7
Effect
Feed
rpm
Feed*rpm
Hard*Feed*rpm
Group
rpm 100
rpm 200
rpm 400
rpm 800
Estimate
11.28
14.36
104.03
242.57
StdErr
3.26
4.15
30.03
70.02
ZValue
3.46
3.46
3.46
3.46
Lower
6.88
8.76
63.43
147.89
Upper
21.84
27.80
201.33
469.45
Parameters
4
AIC
777.7
AICC
778.2
HQIC
782.4
BIC
789.1
CAIC
793.1
NumDF
3
3
9
16
DenDF
52.6
34.3
35.9
24
FValue
10.77
18.58
0.85
12.11
ProbF
0.0000
0.0000
0.5795
0.0000
TABLE 14.15
PROC MIXED Code to Fit a Model with Unequal Variances for Each
Level of rpm and a Factorial Structure for the Covariate Part of the Model
proc mixed data=twoway cl covtest ic;
class feed rpm;
model rough=feed|rpm hard hard*feed hard*rpm hard*feed*rpm/ddfm=satterth;
repeated/group=rpm;
CovParm
Residual
Residual
Residual
Residual
Group
rpm 100
rpm 200
rpm 400
rpm 800
Estimate
11.28
14.36
104.03
242.57
StdErr
3.26
4.15
30.03
70.02
ZValue
3.46
3.46
3.46
3.46
Effect
Feed
rpm
Feed*rpm
Hard
Hard*Feed
Hard*rpm
Hard*Feed*rpm
NumDF
3
3
9
1
3
3
9
DenDF
52.6
34.3
35.9
52.4
51.5
34.0
35.5
FValue
10.77
18.58
0.85
45.04
0.71
0.79
0.54
ProbF
0.0000
0.0000
0.5795
0.0000
0.5485
0.5082
0.8349
© 2002 by CRC Press LLC
Lower
6.88
8.76
63.43
147.89
Upper
21.84
27.80
201.33
469.45
Analysis of Covariance Models with Heterogeneous Errors
23
TABLE 14.16
PROC MIXED Code to Fit a Model with Unequal Variances
for Each Level of rpm and a Factorial Structure for the
Covariate Part of the Model without the Hard*Feed*rpm Term
proc mixed data=twoway cl covtest ic;
class feed rpm;
model rough=feed|rpm hard hard*feed
hard*rpm/ddfm=satterth;
repeated/group=rpm;
CovParm
Residual
Residual
Residual
Residual
Group
rpm 100
rpm 200
rpm 400
rpm 800
Estimate
10.91
13.95
96.17
237.74
StdErr
3.07
3.88
26.22
64.89
ZValue
3.56
3.60
3.67
3.66
Effect
Feed
rpm
Feed*rpm
Hard
Hard*Feed
Hard*rpm
NumDF
3
3
9
1
3
3
DenDF
67.6
37.7
37.3
53.6
60.2
37.4
FValue
40.30
20.62
8.18
48.36
2.72
0.80
ProbF
0.0000
0.0000
0.0000
0.0000
0.0522
0.5010
Lower
6.73
8.64
60.07
148.43
Upper
20.70
26.24
178.40
441.38
in which unequal variances for the levels of rpm and the slopes and intercepts of
Model 14.2 are expressed as factorial effects. The significance level corresponding
to Hard*Feed*rpm is 0.8349, indicating that there is not a significant interaction
effect on the slopes. A reduced model is
(
) (
)
y ijk = µ + τ i + γ j + δ ij + λ + ρi + φ j x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
(14.5)
)
ε ijk ~ N 0, σ i2 ,
where αij = µ + τi + γj + δij and βij = λ + ρi + φj.
Table 14.16 contains the PROC MIXED code to fit the reduced model obtained
excluding the Hard*Feed*rpm term and the results indicate that the slopes are not
unequal levels of rpm since the significance level corresponding to Hard*rpm is
0.5010. A reduced model without the Hard*rpm and Hard*Feed*rpm terms is
(
) (
)
y ijk = µ + τ i + γ j + δ ij + λ + φ j x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
)
ε ijk ~ N 0, σ i2 ,
© 2002 by CRC Press LLC
(14.6)
TABLE 14.17
PROC MIXED Code to Fit a Model with Unequal Variances for
Each Level of rpm and a Factorial Structure for the Covariate
Part of the Model without the rpm and Hard*feed*rpm Term
proc mixed data=twoway cl covtest ic;
class feed rpm;
model rough=feed|rpm hard hard*feed/ddfm=satterth;
repeated/group=rpm;
CovParm
Residual
Residual
Residual
Residual
Group
rpm 100
rpm 200
rpm 400
rpm 800
Estimate
10.92
14.27
93.88
232.83
StdErr
3.06
3.95
25.15
62.46
ZValue
3.57
3.62
3.73
3.73
Effect
Feed
rpm
Feed*rpm
Hard
Hard*Feed
NumDF
3
3
9
1
3
DenDF
67.9
38.5
38.7
64.4
60.4
FValue
39.89
767.09
8.18
174.68
3.91
ProbF
0.0000
0.0000
0.0000
0.0000
0.0129
Lower
6.75
8.86
59.06
146.41
Upper
20.67
26.74
172.01
427.00
where αij = µ + τi + γj + δij and βj = λ + φj. This reduced model is fit by the PROC
MIXED code in Table 14.17. The model could also be expressed as
(
) ( )
y ijk = µ + τ i + γ j + δ ij + β j x ijk + ε ijk ,
i = 1, 2, 3, 4, j = 1, 2, 3, 4, k = 1, 2, …, 8,
(
(14.7)
)
ε ijk ~ N 0, σ i2 ,
The results indicate that there is sufficient information to conclude that the slopes
for the levels of Feed are unequal, since the significance level corresponding to
Hard*Feed is 0.0129. There is an indication that there is an interaction effect on the
intercepts; thus the LSMEANS statements in Table 14.18 were used to provide
adjusted means or predicted values from the regression models at three values of
hardness, i.e., at Hard = 55.45 (the mean), 40, and 70. The estimated values from
Hard = 40 and 70 were used to provide plots of the predicted regression models and
they are displayed in Figures 14.2 through 14.9. Multiple comparisons using the
simulate adjustment were carried out for making comparisons of the levels of feed
within each level of rpm and comparing the levels of rpm within each level of feed.
The means of all levels of rpm with each level of feed were significantly different
(not displayed here). Table 14.19 contains all of the comparisons of the level of feed
within each level of rpm computed at each of the three values of Hard. The columns
Adjp(40), Adjp(mn), and Adjp(70) are the adjusted significance levels using the
© 2002 by CRC Press LLC
Analysis of Covariance Models with Heterogeneous Errors
25
TABLE 14.18
Adjusted Means for the Feed*rpm Combinations Computed
at Three Values of Hardness
lsmeans feed*rpm/diff at means adjust=simulate;
lsmeans feed*rpm/diff at hard=40 adjust=simulate;
lsmeans feed*rpm/diff at hard=70 adjust=simulate;
Hard=55.45
Feed
0.01
0.01
0.01
0.01
0.02
0.02
0.02
0.02
0.04
0.04
0.04
0.04
0.08
0.08
0.08
0.08
rpm
100
200
400
800
100
200
400
800
100
200
400
800
100
200
400
800
Estimate
49.05
61.61
85.01
139.94
61.96
74.91
107.07
168.29
89.08
103.13
139.33
206.33
135.99
157.44
191.64
282.75
Hard=40
StdErr
1.23
1.35
3.44
5.39
1.22
1.43
3.45
5.39
1.22
1.40
3.47
5.40
1.17
1.42
3.43
5.40
Estimate
40.12
52.68
76.08
131.01
53.85
66.80
98.95
160.18
74.98
89.03
125.24
192.23
121.64
143.09
177.29
268.40
StdErr
1.79
2.03
3.98
5.65
2.31
1.75
4.00
5.64
1.99
2.75
3.71
5.68
1.95
2.41
3.78
5.57
Hard=70
Estimate
57.45
70.01
93.41
148.34
69.60
82.55
114.70
175.93
102.35
116.40
152.61
219.60
149.50
170.95
205.15
296.26
StdErr
2.31
2.25
3.67
5.64
1.69
2.46
3.61
5.62
2.50
1.95
4.18
5.77
1.80
1.63
3.67
5.61
Roughness
Roughness models for levels of RPM
Feed= 0.01
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
Hardness
100
200
FIGURE 14.2 RPM models at Feed = 0.10.
© 2002 by CRC Press LLC
400
800
70.00
75.00
26
Analysis of Messy Data, Volume III: Analysis of Covariance
Roughness
Roughness models for levels of RPM
Feed= 0.02
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
70.00
75.00
70.00
75.00
Hardness
100
200
400
800
FIGURE 14.3 RPM models at Feed = 0.02.
Roughness
Roughness models for levels of RPM
Feed= 0.04
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
Hardness
100
200
400
800
FIGURE 14.4 RPM models at Feed = 0.04.
simulate method (Westfall, 1996) for comparing the feed means within each level
of rpm at Hard = 40, 55.45, and 70, respectively. All feed means within each level
of rpm are significantly different (0.05) except for 0.01 and 0.02 at rpm = 800 and
Hard = 70, which has a significance level of 0.0586. The final part of the analysis
was to investigate how the factorial effects change the relationships between the
© 2002 by CRC Press LLC
Analysis of Covariance Models with Heterogeneous Errors
27
Roughness
Roughness models for levels of RPM
Feed= 0.08
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
70.00
75.00
70.00
75.00
Hardness
100
200
400
800
FIGURE 14.5 RPM models at Feed = 0.08.
Roughness
Roughness models for levels of Feed
rpm= 100
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
Hardness
0.01
0.02
0.04
0.08
FIGURE 14.6 Feed models at rpm = 100.
models evaluated at different values of hardness. Table 14.20 contains the PROC
MIXED code to fit Model 14.7 to the data using three different adjusted values of
the covariate, Hard40 = Hard – 40, Hardmn = Hard – 55.45, and Hard70 = Hard –
70. The factorial effects in the analyses in Table 14.20 are measuring the effect of
the levels of Feed, levels of rpm, and their interaction on the models evaluated at
© 2002 by CRC Press LLC
28
Analysis of Messy Data, Volume III: Analysis of Covariance
Roughness
Roughness models for levels of Feed
rpm= 200
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
70.00
75.00
70.00
75.00
Hardness
0.01
0.02
0.04
0.08
FIGURE 14.7 Feed models at rpm = 200.
Roughness
Roughness models for levels of Feed
rpm= 400
300
270
240
210
180
150
120
90
60
30
0
35.00
40.00
45.00
50.00
55.00
60.00
65.00
Hardness
0.01
0.02
0.04
0.08
FIGURE 14.8 Feed models at rpm = 400.
the three levels of Hard. All of the factorial effects are highly significant, indicating
that comparisons among the cell means is a reasonable approach to evaluating the
effect of the levels of feed and the levels of rpm.
© 2002 by CRC Press LLC