Chapter Contents |
Previous |
Next |
XRCHART Statement |
See SHWXR1 in the SAS/QC Sample Library |
The previous example illustrates how you can create and R charts using raw data (process measurements). However, in many applications, the data are provided as subgroup means and ranges. This example illustrates how you can use the XRCHART statement with data of this type.
The following data set (WAFERSUM) provides the data from the preceding
example in summarized form:
data wafersum; input batch diamtrx diamtrr; diamtrn = 5; datalines; 1 34.992 0.02 2 34.994 0.03 3 34.998 0.01 4 34.998 0.02 5 34.992 0.02 6 34.996 0.01 7 34.996 0.03 8 34.992 0.02 9 34.992 0.03 10 35.000 0.02 11 34.996 0.03 12 34.994 0.03 13 34.992 0.03 14 34.998 0.02 15 34.988 0.02 16 35.000 0.02 17 34.984 0.01 18 35.002 0.04 19 34.988 0.02 20 34.994 0.01 21 34.992 0.02 22 35.002 0.01 23 35.004 0.04 24 34.996 0.03 25 34.994 0.01 ;
A listing of the data set WAFERSUM is shown in Figure 43.3.
In this data set, there is exactly one observation for each subgroup (note that the subgroups are still indexed by BATCH). The variable DIAMTRX contains the subgroup means, the variable DIAMTRR contains the subgroup ranges, and the variable DIAMTRN contains the subgroup sample sizes (these are all equal to five).
You can read this data set by specifying it as a HISTORY=
data set in the PROC SHEWHART statement, as follows:
title 'Mean and Range Charts for Diameters'; proc shewhart history=wafersum lineprinter; xrchart diamtr*batch='*'; run;
The charts are shown in Figure 43.4. Since the LINEPRINTER option is specified in the PROC SHEWHART statement, line printer output is produced. * The asterisk (*) specified in single quotes after the subgroup-variable indicates the character used to plot the points. This character must follow an equal sign.
Note that DIAMTR is not the name of a SAS variable in the data set WAFERSUM but is, instead, the common prefix for the names of the three SAS variables DIAMTRX, DIAMTRR, and DIAMTRN. The suffix characters X, R, and N indicate mean, range, and sample size, respectively. Thus, you can specify three subgroup summary variables in the HISTORY= data set with a single name (DIAMTR), which is referred to as the process. The name BATCH specified after the asterisk is the name of the subgroup-variable.
|
In general, a HISTORY= input data set used with the XRCHART
statement must contain the following variables:
Furthermore, the names of the subgroup mean, range, and sample size
variables must begin with the process name specified in
the XRCHART statement and end with the special suffix characters
X, R, and N, respectively.
If the names do not follow this
convention, you can use the RENAME option
to rename the variables for the duration of the SHEWHART
procedure step. Suppose that, instead of the variables DIAMTRX,
DIAMTRR, and DIAMTRN, the data set WAFERSUM contained summary
variables named MEANS, RANGES, and SIZES. The following statements
would temporarily rename MEANS, RANGES, and SIZES to DIAMTRX, DIAMTRR,
and DIAMTRN, respectively:
proc shewhart history=wafersum (rename=(means = diamtrx ranges = diamtrr sizes = diamtrn )); xrchart diamtr*batch='*'; run;
In summary, the interpretation of process depends on the
input data set:
For more information, see "HISTORY= Data Set" .
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.