Chapter Contents |
Previous |
Next |
RCHART Statement |
See SHWRCHR in the SAS/QC Sample Library |
The previous example illustrates how you can create R charts using raw data (process measurements). However, in many applications the data are provided as subgroup summary statistics. This example illustrates how you can use the RCHART statement with data of this type.
The following data set (DISKSUM) provides the data from the preceding example in summarized form:
data disksum; input lot timex timer; timen=6; datalines; 1 8.00833 0.16 2 8.02167 0.09 3 7.97833 0.07 4 8.00667 0.10 5 8.01833 0.16 6 8.00667 0.12 7 7.98500 0.15 8 8.03000 0.11 9 8.03000 0.15 10 7.99167 0.10 11 7.98833 0.10 12 7.98500 0.09 13 7.98833 0.13 14 8.00167 0.10 15 7.98333 0.13 16 8.01833 0.09 17 8.00833 0.11 18 7.98667 0.20 19 7.98667 0.18 20 8.01500 0.10 21 7.99000 0.14 22 8.01833 0.20 23 8.00833 0.11 24 7.98500 0.06 25 8.03667 0.15 ;
A listing of DISKSUM is shown in Figure 39.3. There is exactly one observation for each subgroup (note that the subgroups are still indexed by LOT). The variable TIMEX contains the subgroup means, the variable TIMER contains the subgroup ranges, and the variable TIMEN contains the subgroup sample sizes (these are all six).
You can read this data set by specifying it as a HISTORY= data set in the PROC SHEWHART statement, as follows:
title 'Range Chart for Disk Drive Test Times'; proc shewhart history=disksum lineprinter; rchart time*lot='X'; run;
The resulting R chart is shown in Figure 39.4. Since the LINEPRINTER option is specified in the PROC SHEWHART statement, line printer output is produced. The character (X) specified in single quotes after the subgroup-variable specifies the character used to plot points. This character must follow an equal sign.
Note that TIME is not the name of a SAS variable in the data set DISKSUM but is, instead, the common prefix for the names of the SAS variables TIMER and TIMEN. The suffix characters R and N indicate range and sample size, respectively. Thus, you can specify two subgroup summary variables in the HISTORY= data set with a single name (TIME), which is referred to as the process. The name LOT specified after the asterisk is the name of the subgroup-variable.
|
In general, a HISTORY= input data set used with the RCHART
statement must contain the following variables:
Furthermore, the names of the subgroup range and sample size variables must begin with the process name specified in the RCHART statement and end with the special suffix characters R and N, respectively. If the names do not follow this convention, you can use the RENAME option.
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.