|Syntax: NPCHART Statement|
The basic syntax for the NPCHART statement is as follows:
The general form of this syntax is as follows:
You can use any number of NPCHART statements in the SHEWHART procedure. The components of the NPCHART statement are described as follows.
If numbers of nonconforming items are read from a DATA= data set, process must be the name of the variable containing the numbers. For an example, see Creating np Charts from Count Data.
If proportions of nonconforming items are read from a HISTORY= data set, process must be the common prefix of the summary variables in the HISTORY= data set. For an example, see Creating np Charts from Summary Data.
If numbers of nonconforming items and control limits are read from a TABLE= data set, process must be the value of the variable _VAR_ in the TABLE= data set. For an example, see Saving Control Limits.
A process is required. If you specify more than one process, enclose the list in parentheses. For example, the following statements request distinct charts for Rejects and Reworks:
proc shewhart data=Measures; npchart (Rejects Reworks)*Sample / subgroupn=100; run;
Note that when data are read from a DATA= data set, the SUBGROUPN= option, which specifies subgroup sample sizes, is required.
is the variable that identifies subgroups in the data. The subgroup-variable is required. In the preceding NPCHART statement, Sample is the subgroup variable. For details, see Subgroup Variables.
are optional variables that group the data into blocks of consecutive subgroups. The blocks are labeled in a legend, and each block-variable provides one level of labels in the legend. See Displaying Stratification in Blocks of Observations for an example.
If you produce a line printer chart, an 'A' is displayed for the points corresponding to the first level of the symbol-variable, a 'B' is displayed for the points corresponding to the second level, and so on.
If you produce traditional graphics, distinct symbol markers are displayed for points corresponding to the various levels of the symbol-variable. You can specify the symbol markers with SYMBOL statements. See Displaying Stratification in Levels of a Classification Variable for an example.
proc shewhart data=Values lineprinter; npchart Rejects*Day='*' / subgroupn=100; run;
enhance the appearance of the chart, request additional analyses, save results in data sets, and so on. The Summary of Options section, which follows, lists all options by function. Dictionary of Options: SHEWHART Procedure describes each option in detail.