The PARETO Procedure |
This example is a continuation of Example 11.4.
[See PARETO1 in the SAS/QC Sample Library]In some applications involving comparative Pareto charts, it is useful to classify the cells into groups. This example shows how you can display this type of classification by coloring the tiles and adding a legend.
Suppose that you want to enhance Output 11.4.1 by highlighting the two cells for which Process='Process B' and Day='March 4' and 'March 5' to emphasize the improvement displayed in those cells. Begin by adding a tile color variable (TILECOL) and a tile legend variable (TILELEG) to the data set Failure4.
data Failure4; length tilecol $ 8 tileleg $ 16 ; set Failure4; if (Process='Process B') and (Day='March 4' or Day='March 5') then do; tilecol='ywh'; tileleg = 'Improvement'; end; else do; tilecol='ligr' ; tileleg = 'Status Quo' ; end; run;
The following statements specify TILECOL as a CTILES= variable and TILELEG as a TILELEGEND= variable. Note that the variable names are enclosed in parentheses.
title 'Where Did Improvement Occur?'; proc pareto data=Failure4; vbar Cause / class = ( Process Day ) freq = Counts nrows = 2 ncols = 5 last = 'Miscellaneous' scale = count catleglabel = 'Failure Causes:' /* options for highlighting bars: */ bars = ( priority ) barlegend = ( priority ) barleglabel = 'Priority:' /* options for highlighting tiles: */ ctiles = ( tilecol ) tilelegend = ( tileleg ) tileleglabel = 'Condition:' intertile = 1.0 cframeside = ligr cframetop = ligr nohlabel nocurve ; run;
In the chart, shown in Output 11.5.1, the values displayed in the legend labeled Condition: are the levels of the TILELEGEND= variable.
Copyright © SAS Institute, Inc. All Rights Reserved.