The CAPABILITY Procedure |
Syntax |
The syntax for the HISTOGRAM statement is as follows:
You can specify the keyword HIST as an alias for HISTOGRAM. You can use any number of HISTOGRAM statements after a PROC CAPABILITY statement. The components of the HISTOGRAM statement are described as follows.
are the process variables for which histograms are to be created. If you specify a VAR statement, the variables must also be listed in the VAR statement. Otherwise, the variables can be any numeric variables in the input data set. If you do not specify variables in a VAR statement or in the HISTOGRAM statement, then by default, a histogram is created for each numeric variable in the DATA= data set. If you use a VAR statement and do not specify any variables in the HISTOGRAM statement, then by default, a histogram is created for each variable listed in the VAR statement.
For example, suppose a data set named steel contains exactly two numeric variables named length and width. The following statements create two histograms, one for length and one for width:
proc capability data=steel; histogram; run;
The following statements also create histograms for length and width:
proc capability data=steel; var length width; histogram; run;
The following statements create a histogram for length only:
proc capability data=steel; var length width; histogram length; run;
add features to the histogram. Specify all options after the slash (/) in the HISTOGRAM statement.
For example, in the following statements, the NORMAL option displays a fitted normal curve on the histogram, the MIDPOINTS= option specifies midpoints for the histogram, and the CTEXT= option specifies the color of the text:
proc capability data=steel; histogram length / normal midpoints = 5.6 5.8 6.0 6.2 6.4 ctext = yellow; run;
Copyright © SAS Institute, Inc. All Rights Reserved.