Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Graphical Enhancements

Displaying Stratification in Levels of a Classification Variable

See SHWSYM1 in the SAS/QC Sample Library

To display process data stratified into levels of a classification variable, specify the name of this variable after an equal sign (=) immediately following the subgroup-variable in the chart statement. The classification variable, referred to as the symbol-variable, must be a variable in the input data set (a DATA=, HISTORY=, or TABLE= data set). The subgroup summary statistics are classified into groups according to the levels of the symbol-variable and are identified on the chart with unique plotting symbols.

If you use a graphics device, you can specify the symbols with SYMBOL statements. It is recommended that you place the SYMBOL statements before the PROC SHEWHART statement. If you omit the SYMBOL statements, the procedure uses the default symbol (+) for all levels of the symbol-variable but plots the points for each level in a distinct color. The following example illustrates the use of a symbol-variable to stratify the points on an \bar{X} chart according to the machine that produced the parts in each subgroup:

   symbol1 c=yellow value=star      h=3.0 pct;
   symbol2 c=red    value=dot       h=3.0 pct;
   symbol3 c=blue   value=triangle  h=3.0 pct;
   title 'Control Chart for Diameter Stratified by Machine';

   proc shewhart history=parts;
      xchart diam*sample=machine / stddeviations
                                   symbollegend = legend1
                                   cframe       = ligr
                                   cinfill      = mobg
                                   cconnect     = cxfefefe;
     label sample = 'Sample Number'
           diamx  = 'Average Diameter' ;
     legend1 FRAME CFRAME=ligr CBORDER=black POSITION=center label=('Machine');
   run;

The symbols are specified with the SYMBOL1, SYMBOL2, and SYMBOL3 statements. The SYMBOLLEGEND= option requests a customized legend for the symbols. For more information on the LEGEND and SYMBOL statements, refer to SAS/GRAPH Software: Reference. The \bar{X} chart, shown in Figure 47.1, reveals an effect due to MACHINE. In particular, Machine C334 is associated with a run of parts whose diameters are systematically below average, suggesting that this machine may require adjustment.

For charts produced on a line printer, you can use the SYMBOLCHARS= option to specify the characters that identify the stratification of the points. For details, see the entry for the SYMBOLCHARS= option in Chapter 46, "Dictionary of Options."

In this example, Machine A386 is associated with two different blocks of observations that are identified with a common symbol. However, a symbol-variable is particularly useful for situations where the stratification is not necessarily chronological or associated with blocks of consecutive groups of observations.

gsymbl1.gif (7646 bytes)

Figure 47.1: Control Chart Stratified into Levels Using Symbols


Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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