Chapter Contents |
Previous |
Next |
XSCHART Statement |
See SHWXS1 in the SAS/QC Sample Library |
The previous example illustrates how you can create and s 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 XSCHART statement with data of this type.
The following data set (OILSUM) provides the data from the preceding
example in summarized form:
data oilsum; input day kwattsx kwattss kwattsn; informat day date7. ; format day date5. ; label day='Date of Measurement'; datalines; 04JUL94 3487.40 220.260 20 05JUL94 3471.65 210.427 20 06JUL94 3488.30 147.025 20 07JUL94 3434.20 157.637 20 08JUL94 3475.80 258.949 20 09JUL94 3518.10 211.566 20 10JUL94 3492.65 193.779 20 11JUL94 3496.40 212.024 20 12JUL94 3398.50 199.201 20 13JUL94 3456.05 173.455 20 14JUL94 3493.60 187.465 20 15JUL94 3563.30 205.472 20 16JUL94 3519.05 173.676 20 17JUL94 3474.20 200.576 20 18JUL94 3443.60 222.084 20 19JUL94 3586.35 185.724 20 20JUL94 3486.45 223.474 20 21JUL94 3492.90 145.267 20 22JUL94 3432.80 190.994 20 23JUL94 3496.90 208.858 20 ;
A listing of OILSUM is shown in Figure 44.3.
There is exactly one observation for each
subgroup (note that the subgroups are
still indexed by DAY). The variable KWATTSX contains the
subgroup means, the variable KWATTSS contains the
subgroup standard deviations, and the variable KWATTSN contains
the subgroup sample sizes (which are all 20).
You can read this data set by specifying it as a HISTORY=
data set in the PROC SHEWHART statement, as follows:
title 'Mean and Standard Deviation Charts for Power Output'; proc shewhart history=oilsum lineprinter; xschart kwatts*day='*'; run;
The resulting and s charts are shown in Figure 44.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 KWATTS is not the name of a SAS variable in the data set OILSUM but is, instead, the common prefix for the names of the three SAS variables KWATTSX, KWATTSS, and KWATTSN. The suffix characters X, S, and N indicate mean, standard deviation, and sample size, respectively. Thus, you can specify three subgroup summary variables in the HISTORY= data set with a single name (KWATTS), which is referred to as the process. The name DAY specified after the asterisk is the name of the subgroup-variable.
|
In general, a HISTORY= input data set used with the XSCHART
statement must contain the following variables:
Furthermore, the names of the subgroup mean, standard deviation, and sample size variables must begin with the process name specified in the XSCHART statement and end with the special suffix characters X, S, 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. For an illustration, see Example 44.2.
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.