RCHART Statement: SHEWHART Procedure

Saving Summary Statistics

See SHWRCHR in the SAS/QC Sample LibraryIn this example, the RCHART statement procedure is used to create a summary data set that can be read later by the SHEWHART procedure (as in the preceding example). The following statements read measurements from the data set Disks and create a summary data set named Diskhist:

proc shewhart data=Disks;
   rchart Time*Lot / outhistory = Diskhist
   nochart;
run;

The OUTHISTORY= option names the output data set, and the NOCHART option suppresses the display of the chart, which would be identical to the chart in Figure 17.70. Options such as OUTHISTORY= and NOCHART are specified after the slash (/) in the RCHART statement. A complete list of options is presented in the section Syntax: RCHART Statement.

Figure 17.73 contains a partial listing of Diskhist.

Figure 17.73: The Summary Data Set Diskhist

Summary Data Set for Disk Times

Lot TimeX TimeR TimeN
1 8.00833 0.16 6
2 8.02167 0.09 6
3 7.97833 0.07 6
4 8.00667 0.10 6
5 8.01833 0.16 6


There are four variables in the data set Diskhist.

  • Lot contains the subgroup index.

  • TimeX contains the subgroup means.

  • TimeR contains the subgroup ranges.

  • TimeN contains the subgroup sample sizes.

The subgroup mean variable is included in the OUTHISTORY= data set even though it is not required by the RCHART statement. This enables the data set to be used as a HISTORY= data set with the BOXCHART, XCHART, and XRCHART statements, as well as with the RCHART statement. Note that the summary statistic variables are named by adding the suffix characters X, R, and N to the process Time specified in the RCHART statement. In other words, the variable naming convention for OUTHISTORY= data sets is the same as that for HISTORY= data sets.

For more information, see OUTHISTORY= Data Set.