The SHEWHART Procedure


Learning to Use the SHEWHART Procedure

Although the SHEWHART procedure provides a large number of options, you can use the procedure to create a basic Shewhart chart with as few as two SAS statements:

  • the PROC SHEWHART statement, which starts the procedure and specifies the input SAS data set

  • a chart statement, which specifies the type of Shewhart chart you want to create and the variables in the input data set that you want to analyze

For example, you can use the following statements to create $\bar{X}$ and R charts with $3\sigma $ limits for measurements read from a SAS data set named Drums:

proc shewhart data=Drums;
   xrchart Flangewidth * Hour;
run;

The keyword XRCHART in the chart statement specifies that $\bar{X}$ and R charts are to be created. The following SAS variables are specified in the XRCHART statement:

  • A SAS variable (Flangewidth), whose values are the process measurements, is specified before the asterisk. This variable is referred to as the process.

  • A SAS variable (Hour), whose values classify the measurements into subgroups, is specified after the asterisk. This variable is referred to as a subgroup-variable.

The same form of specification is used with other chart statements to create different types of Shewhart charts. The following table lists the 13 chart statements that are available with the SHEWHART procedure:

Table 17.1: Chart Statements in the SHEWHART Procedure

Statement

Chart(s) Displayed

"Getting Started" Section

BOXCHART

box chart with optional trend chart

Getting Started: BOXCHART Statement

CCHART

c chart

Getting Started: CCHART Statement

IRCHART

individual and moving range charts

Getting Started: IRCHART Statement

MCHART

median chart with optional trend chart

Getting Started: MCHART Statement

MRCHART

median and R charts

Getting Started: MRCHART Statement

NPCHART

$np$ chart

Getting Started: NPCHART Statement

PCHART

p chart

Getting Started: PCHART Statement

RCHART

R chart

Getting Started: RCHART Statement

SCHART

s chart

Getting Started: SCHART Statement

UCHART

u chart

Getting Started: UCHART Statement

XCHART

$\bar{X}$ chart with optional trend chart

Getting Started: XCHART Statement

XRCHART

$\bar{X}$ and R charts

Getting Started: XRCHART Statement

XSCHART

$\bar{X}$ and s charts

Getting Started: XSCHART Statement


If you are using the SHEWHART procedure for the first time, you should do the following:

Once you have learned to use a particular chart statement, you will find it straightforward to use the remaining chart statements since their syntax is nearly the same. A separate, self-contained section is provided for each chart statement.