Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
BOXCHART Statement

Input Data Sets

DATA= Data Set

You can read raw data (process measurements) from a DATA= data set specified in the PROC SHEWHART statement. Each process specified in the BOXCHART statement must be a SAS variable in the data set. This variable provides measurements which must be grouped into subgroup samples indexed by the subgroup-variable. The subgroup-variable, specified in the BOXCHART statement, must also be a SAS variable in the DATA= data set. Each observation in a DATA= data set must contain a value for each process and a value for the subgroup-variable. If the i th subgroup contains ni measurements, there should be ni consecutive observations for which the value of the subgroup-variable is the index of the i th subgroup. For example, if each subgroup contains 20 items and there are 30 subgroup samples, the DATA= data set should contain 600 observations. Other variables that can be read from a DATA= data set include

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) with the READPHASES= option (for an example, see "Displaying Stratification in Phases" ).

For an example of a DATA= data set, see "Creating Box Charts from Raw 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;
      boxchart weight*batch;
   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 32.25. 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, CUSUM, or MACONTROL procedures or to read output data sets created with SAS summarization procedures, such as PROC UNIVARIATE.

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


If you specify the STDDEVIATIONS option, the subgroup standard deviation variable must be included; otherwise, the subgroup range variable must be included.

The names of the subgroup summary statistics variables must be the process name concatenated with the following special suffix characters:

Subgroup Summary Statistic Suffix Character
subgroup minimumL
subgroup first-quartile1
subgroup medianM
subgroup meanX
subgroup third-quartile3
subgroup maximumH
subgroup sample sizeN
subgroup rangeR
subgroup standard deviationS
For example, consider the following statements:

   proc shewhart history=summary;
      boxchart (weight yldstren)*batch;
   run;

The data set SUMMARY must include the variables BATCH, WEIGHTL, WEIGHT1, WEIGHTM, WEIGHTX, WEIGHT3, WEIGHTH, WEIGHTR, WEIGHTN, YLDSRENL, YLDSREN1, YLDSRENM, YLDSRENX, YLDSREN3, YLDSRENH, YLDSRENR, and YLDSRENN.

If the STDDEVIATIONS option were specified in the preceding BOXCHART statement, it would be necessary for SUMMARY to include the variables WEIGHTS and YLDSRENS rather than WEIGHTR and YLDSRENR.

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) with the READPHASES= option (see "Displaying Stratification in Phases" for an example).

For an example of a HISTORY= data set, see "Creating Box Charts from Subgroup 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 in 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 BOXCHART statement:

Table 32.27: Variables Required in a TABLE= Data Set
Variable Description
_LCLM_lower control limit for median
_LCLX_lower control limit for mean
_LIMITN_nominal sample size associated with the control limits
_MEAN_process mean
subgroup-variablevalues of the subgroup-variable
_SUBMAX_subgroup maximum
_SUBMIN_subgroup minimum
_SUBMED_subgroup median
_SUBN_subgroup sample size
_SUBQ1_subgroup first quartile (25 th percentile)
_SUBQ3_subgroup third quartile (75 th percentile)
_SUBX_subgroup mean
_UCLM_upper control limit for median
_UCLX_upper control limit for mean

Note that if you specify CONTROLSTAT=MEDIAN, the variables _LCLM_, _SUBMED_, and _UCLM_ are required; otherwise, the variables _LCLX_, _SUBX_, and _UCLX_ are required.

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.