Chapter Contents |
Previous |
Next |
MACHART Statement |
See MACMA1 in the SAS/QC Sample Library |
You can save the control limit parameters used for a moving average chart in a SAS data set; this enables you to use these parameters with future data (see "Reading Preestablished Control Limit Parameters" ) or modify the parameters with a DATA step program.
The following statements read measurements from the data set CLIPS1 (see "Creating Moving Average Charts from Raw Data" ) and save the control limit parameters in a data set named CLIPLIM:
title 'Control Limit Parameters'; proc macontrol data=clips1; machart gap*day / span = 3 outlimits = cliplim nochart; run;
The OUTLIMITS= option names the data set containing the control limits, and the NOCHART option suppresses the display of the chart. The data set CLIPLIM is listed in Figure 21.6.
|
Note that the data set CLIPLIM does not contain the actual control limits, but rather the parameters required to compute the limits.
The data set contains one observation with the parameters for process GAP. The variable _SPAN_ contains the number of terms used to calculate the moving average. The value of _MEAN_ is an estimate of the process mean, and the value of _STDDEV_ is an estimate of the process standard deviation . The value of _LIMITN_ is the nominal sample size associated with the control limits, and the value of _SIGMAS_ is the multiple of associated with the control limits. The variables _VAR_ and _SUBGRP_ are bookkeeping variables that save the process and subgroup-variable. The variable _TYPE_ is a bookkeeping variable that indicates that the values of _MEAN_ and _STDDEV_ are estimates rather than standard values. For more information, see "OUTLIMITS= Data Set" . You can create an output data set containing the control limits and summary statistics with the OUTTABLE= option, as illustrated by the following statements:
title 'Summary Statistics and Control Limits'; proc macontrol data=clips1; machart gap*day / span = 3 outtable = cliptab nochart; run;
This data set contains one observation for each subgroup sample. The variable _UWMA_ contains the uniformly weighted moving average. The variables _SUBX_, _SUBS_, and _SUBN_ contain the subgroup means, subgroup standard deviations, and subgroup sample sizes, respectively. The variables _LCLA_ and _UCLA_ contain the lower and upper control limits, and the variable _MEAN_ contains the central line. The variables _VAR_ and DAY contain the process name and values of the subgroup-variable, respectively. For more information, see "OUTTABLE= Data Set" .
An OUTTABLE= data set can be read later
as a TABLE= data set. For example,
the following statements read
CLIPTAB and display a moving average chart (not shown
here) identical to Figure 21.2:
title 'Moving Average Chart for Gap Measurements'; proc macontrol table=cliptab; machart gap*day; run;
For more information, see "TABLE= Data Set" .
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.