The SHEWHART Procedure


Subgroup Variables

The values of the subgroup-variable, which is specified in the chart statement, indicate how the observations in the input data set (a DATA= , HISTORY= , or TABLE= data set) are arranged into rational subgroups.[36] Typically, the values of the subgroup-variable are one of the following:

  • indices that give the order in which subgroup samples were collected (for example, 1, 2, 3, . . . ). An unformatted numeric subgroup-variable is appropriate for this situation. For an example that uses this type of subgroup-variable, see Creating Charts for Means and Ranges from Raw Data.

  • the dates or times at which subgroup samples were collected (for example, 01JUN, 02JUN, 03JUN, . . . ). A numeric subgroup-variable with a SAS date, time, or datetime format is appropriate for this situation. You can optionally associate a format with the subgroup-variable by using a FORMAT statement; refer to SAS Formats and Informats: Reference for details. For an example that uses this type of subgroup-variable, see Example 18.40.

  • labels that uniquely identify subgroup samples (for example, Lot39, LotX12, Lot43A). A character subgroup-variable (with or without a format) is appropriate for this situation. For an example that uses this type of subgroup-variable, see Example 18.38.

The values of the subgroup-variable also determine how the horizontal axis of the control chart is scaled and labeled.

The notion of a rational subgroup is fundamental to the application of a Shewhart chart. You should select your subgroups so that if special causes of variation are present, the opportunity for variation within subgroups is minimized while the opportunity for variation between subgroups is maximized. In other words, the conditions within a subgroup should be homogeneous. The reason for this requirement is that the construction of the control limits is based on within-subgroup variability. Refer to Montgomery (1996) and Wheeler and Chambers (1986) for approaches to rational subgrouping.

The selection of subgroups is both a practical and a statistical issue that requires knowledge of the process and the sampling or measurement procedure. The values of the subgroup-variable should reflect the selection of subgroups and should not be assigned arbitrarily. Incorrect subgrouping or assignment of subgroup-variable values can result in control limits that are too tight or too wide.

If the input data set is a HISTORY= or TABLE= data set, each observation represents a distinct subgroup, and, consequently, the observations within each BY group must have distinct subgroup variable values. Similarly, if the input data set is a DATA= data set and you are using the CCHART, IRCHART, NPCHART, PCHART, or UCHART statement, each observation represents a distinct subgroup, and, consequently, the observations within each BY group must have distinct subgroup variable values. However, if the input data set is a DATA= data set and you are using the BOXCHART, MCHART, MRCHART, RCHART, SCHART, XCHART, XRCHART, or XSCHART statement, subgroups are identified by groups of consecutive observations with identical values of the subgroup-variable.

The order of the observations in the input data set and the scaling of the horizontal axis depend on the type of the subgroup-variable, which can be numeric or character.



[36] This discussion also applies to the use of subgroup-variables in the CUSUM procedure and the MACONTROL procedure.