The PARETO Procedure

Example 15.7 Merging Columns in a Comparative Pareto Chart

Note: See Merging Columns in a Comparative Pareto Chart in the SAS/QC Sample Library.

This example is a continuation of Example 15.4 and illustrates a method for merging the columns in a comparative Pareto chart.

Suppose that controls for metallization were introduced on Wednesday. To show the effect of the controls, the columns for Monday and Tuesday are to be merged into a column labeled Before Controls, and the remaining columns are to be merged into a column labeled After Controls. The following statements introduce a format named cntlfmt that merges the levels of Day:

proc format;
   value cntlfmt   1-2 = 'Before Controls'
                   3-5 = 'After Controls';

The following statements create the chart shown in Output 15.7.1:

proc pareto data=Failure5;
   vbar Cause / class       = ( Process Day )
                freq        = Counts
                last        = 'Miscellaneous'
                scale       = count
                catleglabel = 'Failure Causes:'
                nocatlabel
                nocurve
                nlegend;
   format Day cntlfmt.;
   label  Day = 'Status of Controls for Metallization';
run;

Output 15.7.1: Merging Classification Levels


The levels of Day are determined by its formatted values, Before Controls and After Controls. By default, the order in which the columns are displayed is determined by the internal values. In this example, there are multiple distinct internal values for each level, and PROC PARETO uses the internal value that occurs first in the input data set.