IRCHART Statement: SHEWHART Procedure

Input Data Sets

DATA= Data Set

You can read individual measurements from a DATA= data set specified in the PROC SHEWHART statement. Each process specified in the IRCHART statement must be a SAS variable in the data set. This variable provides measurements of items indexed by the subgroup-variable. The subgroup-variable, which is specified in the IRCHART statement, must also be a SAS variable in the data set. Each observation in a DATA= data set must contain a measurement for each process and a value for the subgroup-variable. 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

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

For an example of a DATA= data set, see Creating Individual Measurements and Moving Range Charts.

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:[58]

proc shewhart data=info limits=Conlims;
   irchart Weight*ID;
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; see Table 17.20. 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 _LCLI_, _MEAN_, _UCLI_, _LCLR_, _R_, and _UCLR_, which specify the control limits directly

  • the variables _MEAN_ and _STDDEV_, which are used to calculate the control limits according to the equations in Table 17.20

In addition, note the following:

  • The variables _VAR_ and _SUBGRP_ are required. These must be character variables whose lengths are no greater than 32.

  • The variable _INDEX_ is required if you specify the READINDEX= option; this must be a character variable whose length is no greater than 48.

  • The variables _LIMITN_, _SIGMAS_ (or _ALPHA_), and _TYPE_ are optional, but they are recommended to maintain a complete set of control limit information. The variable _TYPE_ must be a character variable of length 8; valid values are 'ESTIMATE', 'STANDARD', 'STDMU', and 'STDSIGMA'. See Example 17.12 for an illustration.

  • BY variables are required if specified with a BY statement.

For an example, see Reading Preestablished Control Limits.

HISTORY= Data Set

You can read individual measurements and moving ranges from a HISTORY= data set specified in the PROC SHEWHART statement. This enables you to reuse OUTHISTORY= data sets that have been created in previous runs of the SHEWHART procedure.

A HISTORY= data set used with the IRCHART statement must contain the following:

  • the subgroup-variable

  • an individual measurements variable for each process

  • a moving range variable for each process

The name of the individual measurements variable must be the process specified in the IRCHART statement. The name of the moving range variable must be the prefix process concatenated with the special suffix character R. For example, consider the following statements:

proc shewhart history=Summary;
   irchart (Weight Yieldstrength) * ID;
run;

The data set Summary must include the variables ID, Weight, WeightR, YieldstrengthN, and YieldstrengthR.

Note that if you specify a process name that contains 32 characters, the name of the moving range variable must be formed from the first 16 characters and the last 15 characters of the process name, suffixed with R.

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

  • _PHASE_ (if the READPHASES= option is specified)

  • block-variables

  • symbol-variable

  • BY variables

  • ID variables

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 Reading Individual Measurements and Moving Ranges.

TABLE= Data Set

You can read individual measurements, moving ranges, 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 in a TABLE= data set, you can use TABLE= data sets to create specialized control charts. Examples are provided in Specialized Control Charts: SHEWHART Procedure.

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

Table 17.24: Variables Required in a TABLE= Data Set

Variable

Description

_LCLI_

lower control limit for individual measurements

_LCLR_

lower control limit for moving range

_LIMITN_

number of consecutive measurements used to calculate moving ranges

_MEAN_

process mean

_R_

average moving range

subgroup-variable

values of the subgroup-variable

_SUBI_

individual measurements

_SUBR_

moving ranges

_UCLI_

upper control limit for individual measurements

_UCLR_

upper control limit for moving range


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.

  • _TESTS_ (if the TESTS= option is specified). This variable is used to flag tests for special causes and must be a character variable of length 8.

  • _VAR_. This variable is required if more than one process is specified or if the data set contains information for more than one process. This variable must be a character variable whose length is no greater than 32.

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



[58] In SAS 6.09 and in earlier releases, it is necessary to specify the READLIMITS option.