The MACONTROL Procedure |
[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 9.5.8.
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;
The data set Cliptab is listed in Figure 9.5.9.
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.
Summary Statistics and Control Limits |
_VAR_ | Day | _SIGMAS_ | _LIMITN_ | _SPAN_ | _SUBN_ | _SUBX_ | _SUBS_ | _LCLA_ | _UWMA_ | _MEAN_ | _UCLA_ | _STDDEV_ | _EXLIM_ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gap | 1 | 3 | 5 | 3 | 5 | 14.904 | 0.18716 | 14.6668 | 14.9040 | 14.95 | 15.2332 | 0.21108 | |
Gap | 2 | 3 | 5 | 3 | 5 | 15.014 | 0.09317 | 14.7498 | 14.9590 | 14.95 | 15.1502 | 0.21108 | |
Gap | 3 | 3 | 5 | 3 | 5 | 14.866 | 0.25006 | 14.7865 | 14.9280 | 14.95 | 15.1135 | 0.21108 | |
Gap | 4 | 3 | 5 | 3 | 5 | 15.048 | 0.23732 | 14.7865 | 14.9760 | 14.95 | 15.1135 | 0.21108 | |
Gap | 5 | 3 | 5 | 3 | 5 | 15.024 | 0.26792 | 14.7865 | 14.9793 | 14.95 | 15.1135 | 0.21108 | |
Gap | 6 | 3 | 5 | 3 | 5 | 15.126 | 0.12260 | 14.7865 | 15.0660 | 14.95 | 15.1135 | 0.21108 | |
Gap | 7 | 3 | 5 | 3 | 5 | 15.220 | 0.23098 | 14.7865 | 15.1233 | 14.95 | 15.1135 | 0.21108 | UPPER |
Gap | 8 | 3 | 5 | 3 | 5 | 14.902 | 0.17254 | 14.7865 | 15.0827 | 14.95 | 15.1135 | 0.21108 | |
Gap | 9 | 3 | 5 | 3 | 5 | 14.910 | 0.19824 | 14.7865 | 15.0107 | 14.95 | 15.1135 | 0.21108 | |
Gap | 10 | 3 | 5 | 3 | 5 | 14.932 | 0.24035 | 14.7865 | 14.9147 | 14.95 | 15.1135 | 0.21108 | |
Gap | 11 | 3 | 5 | 3 | 5 | 15.096 | 0.25618 | 14.7865 | 14.9793 | 14.95 | 15.1135 | 0.21108 | |
Gap | 12 | 3 | 5 | 3 | 5 | 14.912 | 0.16903 | 14.7865 | 14.9800 | 14.95 | 15.1135 | 0.21108 | |
Gap | 13 | 3 | 5 | 3 | 5 | 15.138 | 0.15928 | 14.7865 | 15.0487 | 14.95 | 15.1135 | 0.21108 | |
Gap | 14 | 3 | 5 | 3 | 5 | 14.798 | 0.26329 | 14.7865 | 14.9493 | 14.95 | 15.1135 | 0.21108 | |
Gap | 15 | 3 | 5 | 3 | 5 | 14.944 | 0.20876 | 14.7865 | 14.9600 | 14.95 | 15.1135 | 0.21108 | |
Gap | 16 | 3 | 5 | 3 | 5 | 14.896 | 0.09965 | 14.7865 | 14.8793 | 14.95 | 15.1135 | 0.21108 | |
Gap | 17 | 3 | 5 | 3 | 5 | 14.734 | 0.22512 | 14.7865 | 14.8580 | 14.95 | 15.1135 | 0.21108 | |
Gap | 18 | 3 | 5 | 3 | 5 | 15.046 | 0.24141 | 14.7865 | 14.8920 | 14.95 | 15.1135 | 0.21108 | |
Gap | 19 | 3 | 5 | 3 | 5 | 14.702 | 0.17880 | 14.7865 | 14.8273 | 14.95 | 15.1135 | 0.21108 | |
Gap | 20 | 3 | 5 | 3 | 5 | 14.788 | 0.16634 | 14.7865 | 14.8453 | 14.95 | 15.1135 | 0.21108 |
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 9.5.4:
title 'Moving Average Chart for Gap Measurements'; proc macontrol table=Cliptab; machart Gap*Day; run;
For more information, see TABLE= Data Set.
Copyright © SAS Institute, Inc. All Rights Reserved.