Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
BOXCHART Statement

Saving Summary Statistics

See SHWBOXA in the SAS/QC Sample Library

In this example, the BOXCHART statement is used to create a summary data set that can be read later by the SHEWHART procedure (as in the preceding example). The following statements read measurements from the data set TURBINE and create a summary data set named TURBHIST:

   title 'Summary Data Set for Power Output';
   proc shewhart data=turbine;
      boxchart kwatts*day / outhistory = turbhist
                            nochart;
   run;

The OUTHISTORY= option names the output data set, and the NOCHART option suppresses the display of the chart, which would be identical to the chart in Figure 32.2.

Figure 32.6 contains a listing of TURBHIST.

 
Summary Data Set for Power Output

day kwattsL kwatts1 kwattsX kwattsM kwatts3 kwattsH kwattsR kwattsN
04JUL 3180 3340.0 3487.40 3490.0 3610.0 4050 870 20
05JUL 3179 3333.5 3471.65 3419.5 3605.0 3849 670 20
06JUL 3304 3376.0 3488.30 3456.5 3604.5 3781 477 20
07JUL 3045 3390.5 3434.20 3447.0 3550.0 3629 584 20
08JUL 2968 3321.0 3475.80 3487.0 3611.5 3916 948 20
09JUL 3047 3425.5 3518.10 3576.0 3615.0 3881 834 20
10JUL 3002 3368.5 3492.65 3495.5 3621.5 3787 785 20
11JUL 3196 3346.0 3496.40 3473.5 3592.5 3994 798 20
12JUL 3115 3188.5 3398.50 3426.0 3568.5 3731 616 20
13JUL 3263 3340.0 3456.05 3444.0 3505.5 4040 777 20
14JUL 3215 3336.0 3493.60 3441.5 3616.0 3872 657 20
15JUL 3182 3409.5 3563.30 3561.0 3719.5 3850 668 20
16JUL 3212 3378.0 3519.05 3515.0 3682.5 3769 557 20
17JUL 3077 3329.0 3474.20 3501.5 3599.5 3812 735 20
18JUL 3061 3315.5 3443.60 3435.0 3614.5 3815 754 20
19JUL 3288 3426.5 3586.35 3546.0 3762.5 3877 589 20
20JUL 3114 3373.0 3486.45 3474.5 3635.5 3928 814 20
21JUL 3167 3400.5 3492.90 3488.0 3582.5 3801 634 20
22JUL 3056 3322.0 3432.80 3460.0 3561.0 3800 744 20
23JUL 3145 3308.5 3496.90 3495.0 3652.0 3917 772 20
Figure 32.6: The Summary Data Set TURBHIST

There are nine variables in the data set TURBHIST.


Note that the summary statistic variables are named by adding the suffix characters L, 1, X, M, 3, H, R, and N to the process KWATTS specified in the BOXCHART statement. In other words, the variable naming convention for OUTHISTORY= data sets is the same as that for HISTORY= data sets.

If you specify the STDDEVIATIONS option, the OUTHISTORY= data set includes a subgroup standard deviation variable, rather than a subgroup range variable, as demonstrated by the following statements:

   title 'Summary Data Set for Power Output';
   proc shewhart data=turbine;
      boxchart kwatts*day / outhistory = turbhst2
                            stddeviations
                            nochart;
   run;

Figure 32.7 contains a listing of TURBHST2. The variable KWATTSS contains the subgroup standard deviations.

The STDDEVIATIONS option is recommended when the subgroup sample sizes are greater than 10, and it is also recommended when you use the NOLIMITS option to create standard side-by-side box-and-whisker plots.

For more information, see "OUTHISTORY= Data Set" .

 
Summary Data Set for Power Output

day kwattsL kwatts1 kwattsX kwattsM kwatts3 kwattsH kwattsS kwattsN
04JUL 3180 3340.0 3487.40 3490.0 3610.0 4050 220.260 20
05JUL 3179 3333.5 3471.65 3419.5 3605.0 3849 210.427 20
06JUL 3304 3376.0 3488.30 3456.5 3604.5 3781 147.025 20
07JUL 3045 3390.5 3434.20 3447.0 3550.0 3629 157.637 20
08JUL 2968 3321.0 3475.80 3487.0 3611.5 3916 258.949 20
09JUL 3047 3425.5 3518.10 3576.0 3615.0 3881 211.566 20
10JUL 3002 3368.5 3492.65 3495.5 3621.5 3787 193.779 20
11JUL 3196 3346.0 3496.40 3473.5 3592.5 3994 212.024 20
12JUL 3115 3188.5 3398.50 3426.0 3568.5 3731 199.201 20
13JUL 3263 3340.0 3456.05 3444.0 3505.5 4040 173.455 20
14JUL 3215 3336.0 3493.60 3441.5 3616.0 3872 187.465 20
15JUL 3182 3409.5 3563.30 3561.0 3719.5 3850 205.472 20
16JUL 3212 3378.0 3519.05 3515.0 3682.5 3769 173.676 20
17JUL 3077 3329.0 3474.20 3501.5 3599.5 3812 200.576 20
18JUL 3061 3315.5 3443.60 3435.0 3614.5 3815 222.084 20
19JUL 3288 3426.5 3586.35 3546.0 3762.5 3877 185.724 20
20JUL 3114 3373.0 3486.45 3474.5 3635.5 3928 223.474 20
21JUL 3167 3400.5 3492.90 3488.0 3582.5 3801 145.267 20
22JUL 3056 3322.0 3432.80 3460.0 3561.0 3800 190.994 20
23JUL 3145 3308.5 3496.90 3495.0 3652.0 3917 208.858 20
Figure 32.7: The Summary Data Set TURBHST2

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.