Chapter Contents Previous Next
 Specialized Control Charts

## Testing for Constant Variances

The difference-from-nominal chart should be accompanied by a test that checks whether the variances for each product type are identical (homogeneous). Levene's test of homogeneity is particularly appropriate for short run applications because it is robust to departures from normality; refer to Snedecor and Cochran (1980). You can implement Levene's method by using the GLM procedure to construct a one-way analysis of variance for the absolute deviations of the diameters from averages within product types.

```   proc sort data=old;
by prodtype;

proc means data=old noprint;
var diameter;
by prodtype;
output out=oldmean (keep=prodtype diammean) mean=diammean;

data old;
merge old oldmean;
by prodtype;
absdev = abs( diameter - diammean );

proc means data=old noprint;
var absdev;
by prodtype;
output out=stats n=n mean=mean css=css std=std;

title 'Test for Constant Variance';
proc glm data=old outstat=glmout ;
class prodtype;
model absdev = prodtype;
run;
```
A listing of the results is displayed in Figure 49.22. The large p-value (0.3386) indicates that the data do not reject the hypothesis of homogeneity.

 The GLM Procedure Dependent Variable: absdev

 Source DF Sum of Squares Mean Square F Value Pr > F Model 2 1.02901063 0.51450532 1.13 0.3373 Error 27 12.27381243 0.45458565 Corrected Total 29 13.30282306
Figure 49.22: Levene's Test of Variance Homogeneity

 Chapter Contents Previous Next Top