Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
HBAR Statement

Restricting the Number of Pareto Categories

Unlike the previous examples, some applications involve too many categories to display on a chart. The solution presented here is to create a restricted Pareto chart that displays only the most frequently occurring categories.

The following statements create a Pareto chart for the five most frequently occurring levels of CAUSE in the data set FAILURE2, which is listed in Figure 27.2:

   title 'IC Manufacturing Problems';
   proc pareto data=failure2;
      hbar cause / freq     = count
                   scale    = count
                   maxncat  = 5
                   cframe   = ligr
                   cbars    = vigb
                   cconnect = salmon;
   run;

The MAXNCAT= option specifies the number of categories to be displayed. The chart, shown in Figure 27.4, does not display the categories Doping and Silicon Defect.

parhgs6.gif (4363 bytes)

Figure 27.4: Restricted Pareto Chart

You can also display the most frequently occurring categories and merge the remaining categories into a single other category that is represented by a bar. You can specify the name for the new category with the OTHER= option. If, in addition, you specify the name with the LAST= option, the category is positioned at the bottom of the chart. The following statements illustrate both options:

   title 'IC Manufacturing Problems';
   proc pareto data=failure2;
      hbar cause / freq     = count
                   scale    = count
                   maxncat  = 5
                   other    = 'Others'
                   last     = 'Others'
                   cframe   = ligr
                   cbars    = vigb
                   cconnect = salmon;
   run;

The chart is shown in Figure 27.5.

parhgs7.gif (4339 bytes)

Figure 27.5: Restricted Pareto Chart with Other Category

The number of categories displayed is five, which is the number specified with the MAXNCAT= option. The first four categories are the four most frequently occurring problems in FAILURE2, and the fifth category merges the remaining problems.

Note that Corrosion and Metallization both have a frequency of two. When the MAXNCAT= option is applied to categories with tied frequencies, the procedure breaks the tie by using the order of the formatted values. Thus Corrosion is displayed, whereas Metallization is merged into the Other category. The MAXNCAT= and related options are described in "Restricted Pareto Charts" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.