Procedure features: |
PROC MEANS statement options:
|
COMPLETETYPES |
|
FW= |
|
MISSING |
|
NONOBS | |
CLASS
statement options:
|
EXCLUSIVE |
|
ORDER= |
|
PRELOADFMT | |
WAYS
statement |
|
Other features |
FORMAT procedure |
FORMAT statement |
|
Data set: |
CAKE
|
This example
-
specifies the field width of the statistics
-
suppresses the column with the total number of
observations
-
includes all possible combinations of class variables
values in the analysis even if the frequency is zero
-
considers missing values as valid class levels
-
analyzes the
one-way and two-way combinations
of class variables
-
assigns user-defined formats to the class variables
-
uses only the preloaded range of user-defined
formats as the levels of class variables
-
orders the results by the value of the formatted
data.
|
options nodate pageno=1 linesize=80 pagesize=64; |
|
proc format;
value layerfmt 1='single layer'
2-3='multi-layer'
.='unknown';
value $flvrfmt (notsorted)
'Vanilla'='Vanilla'
'Orange','Lemon'='Citrus'
'Spice'='Spice'
'Rum','Mint','Almond'='Other Flavor';
run; |
|
proc means data=cake fw=7 completetypes missing nonobs; |
|
class flavor layers/preloadfmt exclusive order=data; |
|
ways 1 2; |
|
var TasteScore; |
|
format layers layerfmt. flavor $flvrfmt.; |
|
title 'Taste Score For Number of Layers and Cake Flavors';
run; |
|
Taste Score For Number of Layers and Cake Flavors 1
The MEANS Procedure
Analysis Variable : TasteScore
Layers N Mean Std Dev Minimum Maximum
--------------------------------------------------------------
unknown 1 84.000 . 84.000 84.000
single layer 3 83.000 9.849 75.000 94.000
multi-layer 6 81.167 7.548 72.000 91.000
--------------------------------------------------------------
Analysis Variable : TasteScore
Flavor N Mean Std Dev Minimum Maximum
--------------------------------------------------------------
Vanilla 6 82.167 7.834 73.000 94.000
Citrus 0 . . . .
Spice 3 85.000 5.292 81.000 91.000
Other Flavor 1 72.000 . 72.000 72.000
--------------------------------------------------------------
Analysis Variable : TasteScore
Flavor Layers N Mean Std Dev Minimum Maximum
------------------------------------------------------------------------------
Vanilla unknown 1 84.000 . 84.000 84.000
single layer 3 83.000 9.849 75.000 94.000
multi-layer 2 80.000 9.899 73.000 87.000
Citrus unknown 0 . . . .
single layer 0 . . . .
multi-layer 0 . . . .
Spice unknown 0 . . . .
single layer 0 . . . .
multi-layer 3 85.000 5.292 81.000 91.000
Other Flavor unknown 0 . . . .
single layer 0 . . . .
multi-layer 1 72.000 . 72.000 72.000
------------------------------------------------------------------------------
| |
|
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.