The ANOM Procedure |
[See ANMPLIM in the SAS/QC Sample Library]You can save the decision limits for an ANOM chart in a SAS data set.
The following statements read the number of c-sections per group from the data set CSection (see Creating ANOM Charts for Proportions from Group Counts) and save the decision limits displayed in Figure 4.1.3 in a data set named CSectionLim:
proc anom data=Csection; pchart Csections*ID / groupn = Total outlimits = CsectionLim nochart; run;
The OUTLIMITS= option names the data set containing the decision limits, and the NOCHART option suppresses the display of the chart. The data set CSectionLim is listed in Figure 4.1.7.
The data set CSectionLim contains one observation with the limits for the response CSections. The variables _LDLP_ and _UDLP_ contain the lower and upper decision limits, and the variable _P_ contains the central line. The value of _LIMITN_ is the nominal sample size associated with the decision limits, the value of _LIMITK_ is the number of groups, and the value of _ALPHA_ is the significance level associated with the decision limits. The variables _VAR_ and _GROUP_ are bookkeeping variables that save the response and group-variable. The variable _TYPE_ is a bookkeeping variable that indicates whether the value of _P_ is an estimate or a known (standard) value. Typically, the value of _TYPE_ is 'ESTIMATE.'
For more information, see the section OUTLIMITS= Data Set.
[See ANMPTAB in the SAS/QC Sample Library]You can create an output data set containing both decision limits and summary statistics with the OUTTABLE= option, as illustrated by the following statements:
proc anom data=Csection; pchart Csections*ID / groupn = Total outtable = CsectionTab nochart; run;
A partial listing of the data set CSectionTab is shown in Figure 4.1.8.
Proportions and Decision Limits for Cesarean Sections |
_VAR_ | ID | _ALPHA_ | _LIMITN_ | _SUBN_ | _LDLP_ | _SUBP_ | _P_ | _UDLP_ | _EXLIM_ |
---|---|---|---|---|---|---|---|---|---|
Csections | 1A | 0.05 | 923 | 923 | 0.13658 | 0.16251 | 0.16680 | 0.19703 | |
Csections | 1K | 0.05 | 298 | 298 | 0.10356 | 0.15101 | 0.16680 | 0.23005 | |
Csections | 1B | 0.05 | 170 | 170 | 0.08060 | 0.20000 | 0.16680 | 0.25301 | |
Csections | 1D | 0.05 | 132 | 132 | 0.06816 | 0.13636 | 0.16680 | 0.26545 | |
Csections | 3I | 0.05 | 106 | 106 | 0.05610 | 0.18868 | 0.16680 | 0.27751 | |
Csections | 3M | 0.05 | 105 | 105 | 0.05555 | 0.11429 | 0.16680 | 0.27806 | |
Csections | 1E | 0.05 | 77 | 77 | 0.03611 | 0.12987 | 0.16680 | 0.29750 | |
Csections | 1N | 0.05 | 74 | 74 | 0.03340 | 0.25676 | 0.16680 | 0.30021 | |
Csections | 1Q | 0.05 | 69 | 69 | 0.02851 | 0.10145 | 0.16680 | 0.30510 | |
Csections | 3H | 0.05 | 65 | 65 | 0.02419 | 0.16923 | 0.16680 | 0.30941 |
This data set contains one observation for each group sample. The variables _SUBP_ and _SUBN_ contain the group proportions and group sample sizes. The variables _LDLP_ and _UDLP_ contain the lower and upper decision limits, and the variable _P_ contains the central line. The variables _VAR_ and ID contain the response name and values of the group-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 the information in CSectionTab and display an ANOM chart (not shown here) identical to the chart in Figure 4.1.3:
title 'Analysis of C-Sections'; proc anom table=CSectionTab; pchart CSections*id; label _subp_ = 'Proportion of Cesarean Sections'; run;
Because the ANOM procedure simply displays the information in a TABLE= data set, you can use TABLE= data sets to create specialized ANOM charts. For more information, see TABLE= Data Set.
Copyright © SAS Institute, Inc. All Rights Reserved.