Previous Page | Next Page

The GBARLINE Procedure

Example 2: Calculating Weighted Statistics


Procedure Features:

BAR statement options:

AXIS=

SUMVAR=

PLOT statement options:

AXIS=

FREQ=

SUMVAR=

Other Features:

AXIS statement


[bar line chart showing weighted statistics]

This example uses the FREQ= option to calculate weighted statistics for the line plot. During the manufacture of a metal-oxide semiconductor (MOS) capacitor, various defects and their frequencies were recorded.

 Note about code
goptions reset=all border; 
 Note about code
data failure;
   length Defect $15;
   input  Defect Count @@;
   select (Defect) ;
      when ("Contamination")  Cost=3.5;
      when ("Metallization")  Cost=10;
      when ("Oxide")          Cost=10.5;
      when ("Corrosion")      Cost=4.5;
      when ("Doping")         Cost=3.6;
      when ("Silicon")        Cost=5.4;
      otherwise               Cost=1.0;
        end;

datalines;
Contamination 15   Corrosion 2      Doping 1         Metallization 2
Miscellaneous 3    Oxide 8          Silicon 1        Contamination 16
Corrosion 3        Doping 1         Metallization 3  Miscellaneous 1
Oxide 9            Silicon 2        Contamination 20 Corrosion 1
Doping 1           Metallization 0  Miscellaneous 3  Oxide 7
Silicon 2          Contamination 12 Corrosion 1      Doping 1
Metallization 0    Miscellaneous 0  Oxide 10         Silicon 1
Contamination 23   Corrosion 1      Doping 1         Metallization 0
Miscellaneous 1    Oxide 8          Silicon 2
;
run;
 Note about code
title1 "The Cost of Defects";
footnote1 j=r "GBLWTSTA";
 Note about code
AXIS1 label=("Defect Count");
AXIS2 label=("Total Cost");
 Note about code
proc gbarline data=failure;
   bar Defect/ sumvar=Count axis=axis1;
   plot / sumvar=Count freq=cost axis=axis2;
   run;
quit;

Previous Page | Next Page | Top of Page