Note: See Saving CAPABILITY Output in a Data Set in the SAS/QC Sample Library.
The CAPABILITY procedure automatically computes the 1st, 5th, 10th, 25th, 75th, 90th, 95th, and 99th percentiles for each
variable. You can save these percentiles in an output data set by specifying the appropriate keywords. For example, the following
statements create an output data set named Pctlstr
containing the 5th and 95th percentiles of the variable Strength
:
proc capability data=Belts noprint; var Strength Width; output out=Pctlstr p5=p5str p95=p95str; run;
proc print data=Pctlstr; run;
The output data set Pctlstr
is listed in FigureĀ 5.29.
You can use the PCTLPTS=
, PCTLPRE=
, and PCTLNAME=
options to save percentiles not automatically computed by the CAPABILITY procedure. For example, the following statements
create an output data set named Pctls
containing the 20th and 40th percentiles of the variables Strength
and Width
:
proc capability data=Belts noprint; var Strength Width; output out=Pctls pctlpts = 20 40 pctlpre = S W pctlname = pct20 pct40; run;
proc print data=Pctls; run;
The PCTLPTS= option specifies the percentiles to compute (in this case, the 20th and 40th percentiles). The PCTLPRE= and PCTLNAME= options build the names for the variables containing the percentiles. The PCTLPRE= option gives prefixes for the new variables, and the PCTLNAME= option gives a suffix to add to the prefix. Note that if you use the PCTLPTS= specification, you must also use the PCTLPRE= specification. For details on these options, see the section Syntax: OUTPUT Statement.
The preceding OUTPUT statement saves the 20th and 40th percentiles of Strength
and Width
in the variables spct20
, wpct20
, spct40
, and wpct40
. The output data set Pctls
is listed in FigureĀ 5.30.