Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Details and Examples

Example 29.8: Creating Weighted Pareto Charts

See PARETO12 in the SAS/QC Sample Library

In many applications, you can quantify the priority or severity of a problem with a measure such as the cost of repair or the loss to the customer expressed in man-hours. This example shows how to analyze such data with a weighted Pareto chart that incorporates the cost.

Suppose that the cost associated with each of the problems in data set FAILURE7 (see Example 29.6) has been determined and that the costs have been converted to a relative scale. The following statements add the cost information to the data set:

   data failure7;
      length analysis $ 16 ;
      label analysis = 'Basis for Analysis' ;
      set failure7;
      analysis = 'Cost' ;
         if      cause = 'Contamination'  then cost = 3.0 ;
         else if cause = 'Metallization'  then cost = 8.5 ;
         else if cause = 'Oxide Defect'   then cost = 9.5 ;
         else if cause = 'Corrosion'      then cost = 2.5 ;
         else if cause = 'Doping'         then cost = 3.6 ;
         else if cause = 'Silicon Defect' then cost = 3.4 ;
         else                                  cost = 1.0 ;
         output;
      analysis = 'Frequency' ;
         cost = 1.0 ;
         output;
   run;
The classification variable ANALYSIS has two levels, Cost and Frequency. For ANALYSIS=Cost, the value of COST is the relative cost, and for ANALYSIS=Frequency, the value of COST is one.

The following statements create a one-way comparative Pareto chart with ANALYSIS as the classification variable, in which the cells are weighted Pareto charts with COST as the weight variable:

   title 'Pareto Analysis By Cost and Frequency' ;
   proc pareto data=failure7;
      vbar cause / class      = ( analysis )
                   freq       = counts
                   weight     = cost
                   barlabel   = value
                   cframe     = ligr
                   cbars      = vigb
                   cconnect   = salmon
                   cframeside = ligr
                   cframetop  = ligr
                   intertile  = 1.0 ;
   run;
The display is shown in Output 29.8.1.

Output 29.8.1: Taking Cost into Account
parex8a.gif (6493 bytes)

Within each cell, the height of a bar is the frequency of the category multiplied by the value of COST, expressed as a percent of the total across all categories. Thus, for the cell in which ANALYSIS is equal to Frequency, the bars simply indicate the frequencies expressed in percent units. This display shows that the most commonly occurring problem (Contamination) is not the most expensive problem (Oxide Defect). The output data set SUMMARY is listed in Output 29.8.2.

Output 29.8.2: The Output Data Set SUMMARY
 
Obs analysis cause cost _COUNT_ _WCOUNT_ _PCT_ _CMPCT_
1 Cost Oxide Defect 9.5 172 1634.0 58.6799 58.680
2 Cost Contamination 3.0 220 660.0 23.7018 82.382
3 Cost Metallization 8.5 22 187.0 6.7155 89.097
4 Cost Silicon Defect 3.4 34 115.6 4.1514 93.249
5 Cost Corrosion 2.5 32 80.0 2.8729 96.122
6 Cost Doping 3.6 20 72.0 2.5856 98.707
7 Cost Miscellaneous 1.0 36 36.0 1.2928 100.000
8 Frequency Oxide Defect 1.0 172 172.0 32.0896 32.090
9 Frequency Contamination 1.0 220 220.0 41.0448 73.134
10 Frequency Metallization 1.0 22 22.0 4.1045 77.239
11 Frequency Silicon Defect 1.0 34 34.0 6.3433 83.582
12 Frequency Corrosion 1.0 32 32.0 5.9701 89.552
13 Frequency Doping 1.0 20 20.0 3.7313 93.284
14 Frequency Miscellaneous 1.0 36 36.0 6.7164 100.000

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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