Previous Page | Next Page

The MEANS Procedure

Example 10: Computing Output Statistics with Missing Class Variable Values


Procedure features:

PROC MEANS statement options:

CHARTYPE

NOPRINT

NWAY

CLASS statement options:

ASCENDING

MISSING

ORDER=

OUTPUT statement

Other features:

PRINT procedure

Data set: CAKE

This example


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc means data=cake chartype nway noprint;
 Note about code
   class flavor /order=freq ascending;
   class layers /missing;
 Note about code
   var TasteScore;
 Note about code
   output out=cakestat max=HighScore;
run;
 Note about code
proc print data=cakestat;
   title 'Maximum Taste Score for Flavor and Cake Layers';
run;

Output

 Note about figure
                 Maximum Taste Score for Flavor and Cake Layers                1

                                                               High
            Obs    Flavor       Layers    _TYPE_    _FREQ_    Score

             1     Rum             2        11         1        72 
             2     Spice           2        11         2        83 
             3     Spice           3        11         1        91 
             4     Vanilla         .        11         1        84 
             5     Vanilla         1        11         3        94 
             6     Vanilla         2        11         2        87 
             7     Chocolate       .        11         1        84 
             8     Chocolate       1        11         5        85 
             9     Chocolate       2        11         3        92 

Previous Page | Next Page | Top of Page