Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
NPCHART Statement

Input Data Sets

DATA= Data Set

You can read raw data (counts of nonconforming items) from a DATA= data set specified in the PROC SHEWHART statement. Each process specified in the NPCHART statement must be a SAS variable in the DATA= data set. This variable provides counts for subgroup samples indexed by the values of the subgroup-variable. The subgroup-variable, which is specified in the NPCHART 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 process and a value for the subgroup-variable. The data set must contain one observation for each subgroup. Note that you can specify the DATAUNIT= option in the NPCHART statement to read proportions or percentages of nonconforming items instead of counts. Other variables that can be read from a DATA= data set include


When you use a DATA= data set with the NPCHART statement, the SUBGROUPN= option (which specifies the subgroup sample size) is required. By default, the SHEWHART procedure reads all of the observations in a DATA= data set. However, if the data set includes the variable _PHASE_, you can read selected groups of observations (referred to as phases) by specifying the READPHASES= option (for an example, see "Displaying Stratification in Phases" ).

For an example of a DATA= data set, see "Creating np Charts from Count Data" .

LIMITS= Data Set

You can read preestablished control limits (or parameters from which the control limits can be calculated) from a LIMITS= data set specified in the PROC SHEWHART statement. For example, the following statements read control limit information from the data set CONLIMS:*

   proc shewhart data=info limits=conlims;
      npchart rejects*batch  / subgroupn=100;
   run;

The LIMITS= data set can be an OUTLIMITS= data set that was created in a previous run of the SHEWHART 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:


In addition, note the following:


For an example, see "Reading Preestablished Control Limits" .

HISTORY= Data Set

You can read subgroup summary statistics from a HISTORY= data set specified in the PROC SHEWHART statement. This allows you to reuse OUTHISTORY= data sets that have been created in previous runs of the SHEWHART procedure or to create your own HISTORY= data set.

A HISTORY= data set used with the NPCHART statement must contain


The names of the proportion sample size variables must be the process name concatenated with the special suffix characters P and N, respectively.

For example, consider the following statements:

   proc shewhart history=summary;
      npchart ( rework rejected)*batch / subgroupn=50;
   run;

The data set SUMMARY must include the variables BATCH, REWORKP, REWORKN, REJETEDP, and REJETEDN.

Note that if you specify a process name that contains eight characters, the names of the summary variables must be formed from the first four characters and the last three characters of the process name, suffixed with the appropriate character.

Other variables that can be read from a HISTORY= data set include


By default, the SHEWHART procedure reads all of the observations in a HISTORY= data set. However, if the data set includes the variable _PHASE_, you can read selected groups of observations (referred to as phases) by specifying the READPHASES= option (see "Displaying Stratification in Phases" for an example).

For an example of a HISTORY= data set, see "Creating np Charts from Summary Data" .

TABLE= Data Set

You can read summary statistics and control limits from a TABLE= data set specified in the PROC SHEWHART statement. This enables you to reuse an OUTTABLE= data set created in a previous run of the SHEWHART procedure. Because the SHEWHART procedure simply displays the information read from a TABLE= data set, you can use TABLE= data sets to create specialized control charts. Examples are provided in Chapter 49, "Specialized Control Charts."

The following table lists the variables required in a TABLE= data set used with the NPCHART statement:

Table 37.23: Variables Required in a TABLE= Data Set
Variable Description
_LCLNP_lower control limit for number of nonconforming items
_LIMITN_nominal sample size associated with the control limits
_NP_average number of nonconforming items
subgroup-variablevalues of the subgroup-variable
_SUBN_subgroup sample size
_SUBNP_subgroup number of nonconforming items
_UCLNP_upper control limit for number of nonconforming items

Other variables that can be read from a TABLE= data set include


For an example of a TABLE= data set, see "Saving Control Limits" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.