See ANMPLIM in the SAS/QC Sample LibraryYou can save the decision limits for an ANOM p 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.11 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.15.
Figure 4.15: The Data Set CSectionLim
with Decision Limits
Decision Limits for the Proportion of Cesarean Sections |
_VAR_ | _GROUP_ | _TYPE_ | _LIMITN_ | _ALPHA_ | _LDLP_ | _P_ | _UDLP_ | _LIMITK_ |
---|---|---|---|---|---|---|---|---|
Csections | ID | ESTIMATE | V | 0.05 | V | 0.16680 | V | 29 |
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 LibraryYou 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.16.
Figure 4.16: The Data Set CSectionTab
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.10355 | 0.15101 | 0.16680 | 0.23006 | |
Csections | 1B | 0.05 | 170 | 170 | 0.08059 | 0.20000 | 0.16680 | 0.25302 | |
Csections | 1D | 0.05 | 132 | 132 | 0.06814 | 0.13636 | 0.16680 | 0.26547 | |
Csections | 3I | 0.05 | 106 | 106 | 0.05608 | 0.18868 | 0.16680 | 0.27752 | |
Csections | 3M | 0.05 | 105 | 105 | 0.05553 | 0.11429 | 0.16680 | 0.27807 | |
Csections | 1E | 0.05 | 77 | 77 | 0.03609 | 0.12987 | 0.16680 | 0.29752 | |
Csections | 1N | 0.05 | 74 | 74 | 0.03338 | 0.25676 | 0.16680 | 0.30023 | |
Csections | 1Q | 0.05 | 69 | 69 | 0.02849 | 0.10145 | 0.16680 | 0.30512 | |
Csections | 3H | 0.05 | 65 | 65 | 0.02417 | 0.16923 | 0.16680 | 0.30943 |
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 p chart (not shown here) identical to the chart in Figure 4.11:
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.