[See CAPOUT1 in the SAS/QC Sample Library]The CAPABILITY procedure automatically computes the st, th, th, th, th, th, th, and th 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 th and th 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.
Statistical Intervals for Fluid Weight |
Obs | p95str | p5str |
---|---|---|
1 | 1284.34 | 1126.78 |
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 th and th 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 th and th 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 th and th percentiles of Strength and Width in the variables spct20, wpct20, spct40, and wpct40. The output data set pctls is listed in Figure 5.30.
Statistical Intervals for Fluid Weight |
Obs | Spct20 | Spct40 | Wpct20 | Wpct40 |
---|---|---|---|---|
1 | 1165.91 | 1199.26 | 2.9595 | 2.995 |