are the process variables for which comparative histograms are to be created. If you specify a VAR statement, the variables
must also be listed in the VAR statement. Otherwise, variables can be any numeric variables in the input data set that are
not also listed as class-variables. If you do not specify variables in a COMPHISTOGRAM statement or a VAR statement, then by default a comparative histogram
is created for each numeric variable in the DATA= data set that is not used as a class-variable. If you use a VAR statement
and do not specify variables in the COMPHISTOGRAM statement, then by default a comparative histogram is created for each variable
listed in the VAR statement.
For example, suppose a data set named steel
contains two process variables named length
and width
, a numeric classification variable named lot
, and a character classification variable named day
. The following statements create two comparative histograms, one for length
and one for Width
:
proc capability data=steel;
comphist / class = lot;
run;
Likewise, the following statements create comparative histograms for length
and width
:
proc capability data=steel;
var length width;
comphist / class = day;
run;
The following statements create three comparative histograms (for length
, width
, and lot
):
proc capability data=steel;
comphist / class = day;
run;
The following statements create a comparative histogram for Width
only:
proc capability data=steel;
var length width;
comphist width / class=lot;
run;
are one or two required classification variables.
For example, the following statements create a one-way comparative histogram for width
by using the classification variable lot
:
proc capability data=steel;
comphist width / class=lot;
run;
The following statements create a two-way comparative histogram for width
classified by lot
and day
:
proc capability data=steel;
comphist width / class=(lot day);
run;
Note that the parentheses surrounding the class-variables are needed only if two classification variables are specified. See Output 5.6.1 and Output 5.7.1 for further examples.