You can read count data from a DATA= data set specified in the PROC ANOM statement. Each response specified in the PCHART statement must be a SAS variable in the DATA= data set. This variable provides counts for group samples indexed by the values of the group-variable. The group-variable, which is specified in the PCHART statement, must also be a SAS variable in the DATA= data set. Each observation in a DATA= data set must contain a count for each response and a value for the group-variable. The data set must contain one observation for each group. Note that you can specify the DATAUNIT= option in the PCHART statement to read proportions or percentages instead of counts. Other variables that can be read from a DATA= data set include
_PHASE_
(if the READPHASES= option is specified)
block-variables
symbol-variable
BY variables
ID variables
When you use a DATA= data set with the PCHART statement, the GROUPN= option (which specifies the group sample size) is required.
For an example of a DATA= data set, see Creating ANOM Charts for Proportions from Group Counts.
You can read preestablished decision limits (or parameters from which the decision limits can be calculated) from a LIMITS=
data set specified in the PROC ANOM statement. For example, the following statements read decision limit information from
the data set Conlims
:
proc anom data=Info limits=Conlims; pchart Rejects*Batch / groupn= 100; run;
The LIMITS= data set can be an OUTLIMITS= data set that was created in a previous run of the ANOM procedure. Such data sets always contain the variables required for a LIMITS= data set. The LIMITS= data set can also be created directly using a DATA step. When you create a LIMITS= data set, you must provide one of the following:
the variables _LDLP_
, _P_
, and _UDLP_
, which specify the decision limits directly
the variable _P_
, without providing _LDLP_
and _UDLP_
. The value of _P_
is used to calculate the decision limits according to the equations in the section Decision Limits.
In addition, note the following:
The variables _VAR_
and _GROUP_
are always required. These must be character variables whose lengths are no greater than 32.
_LDLP_
and _UDLP_
must be specified together; otherwise their values are computed.
_ALPHA_
is optional but is recommended in order to maintain a complete set of decision limit information. The default value is 0.05
.
_LIMITK_
is optional. The default value is k, the number of groups. A group must have at least one nonmissing value () and there must be at least one group with . If specified, _LIMITK_
overrides the value of k.
_LIMITN_
is optional. The default value is the common group size (n), in the balanced case . If specified, _LIMITN_
overrides the value of n.
The variable _TYPE_
is optional, but is recommended to maintain a complete set of decision limit information. The variable _TYPE_
must be a character variable of length 8. Valid values are 'ESTIMATE,' 'STANDARD,' 'STDMEAN,' and 'STDRMS.' The default is
'ESTIMATE.'
The variable _INDEX_
is required if you specify the READINDEX= option; this must be a character variable whose length is no greater than 48.
BY variables are required if specified with a BY statement.
You can read group summary statistics from a SUMMARY= data set specified in the PROC ANOM statement. This enables you to reuse OUTSUMMARY= data sets that have been created in previous runs of the ANOM procedure or to create your own SUMMARY= data set.
A SUMMARY= data set used with the PCHART statement must contain the following:
the group-variable
a group proportion variable for each response
a group sample size variable for each response
The names of the proportion sample size variables must be the response name concatenated with the special suffix characters P and N, respectively.
For example, consider the following statements:
proc anom summary=Summary; pchart (Rework Rejected)*Batch / groupn=50; run;
The data set Summary
must include the variables Batch
, ReworkP
, ReworkN
, RejetedP
, and RejetedN
.
Note that if you specify a response name that contains 32 characters, the names of the summary variables must be formed from the first 16 characters and the last 15 characters of the response name, suffixed with the appropriate character.
Other variables that can be read from a SUMMARY= data set include
_PHASE_
(if the READPHASES= option is specified)
block-variables
symbol-variable
BY variables
ID variables
For an example of a SUMMARY= data set, see Creating ANOM Charts for Proportions from Group Summary Data.
You can read summary statistics and decision limits from a TABLE= data set specified in the PROC ANOM statement. This enables you to reuse an OUTTABLE= data set created in a previous run of the ANOM procedure. Because the ANOM procedure simply displays the information read from a TABLE= data set, you can use TABLE= data sets to create specialized ANOM charts.
Table 4.17 lists the variables required in a TABLE= data set used with the PCHART statement.
Table 4.17: Variables Required in a TABLE= Data Set
Variable |
Description |
---|---|
Group-variable |
Values of the group-variable |
|
Lower decision limit for proportions |
|
Nominal sample size associated with the decision limits |
|
Average proportion of nonconforming items |
|
Group sample size |
|
Group proportion of nonconforming items |
|
Upper decision limit for proportions |
Other variables that can be read from a TABLE= data set include
block-variables
symbol-variable
BY variables
ID variables
_PHASE_
(if the READPHASES= option is specified). This variable must be a character variable whose length is no greater than 48.
_VAR_
. This variable is required if more than one response is specified or if the data set contains information for more than one response. This variable must be a character variable whose length is no greater than 32.
For an example of a TABLE= data set, see Saving Decision Limits.