Previous Page | Next Page

The MEANS Procedure

Example 4: Using a CLASSDATA= Data Set with Class Variables


Procedure features:

PROC MEANS statement options:

CLASSDATA=

EXCLUSIVE

FW=

MAXDEC=

PRINTALLTYPES

CLASS statement

Data set: CAKE

This example


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
data caketype;
   input Flavor $ 1-10  Layers 12;
   datalines;
Vanilla    1
Vanilla    2
Vanilla    3
Chocolate  1
Chocolate  2
Chocolate  3
;
 Note about code
proc means data=cake range median min max fw=7 maxdec=0
           classdata=caketype exclusive printalltypes;
 Note about code
   var TasteScore;
   
 Note about code
   class flavor layers;
 Note about code
   title 'Taste Score For Number of Layers and Cake Flavor';
run;

Output

 Note about figure
                Taste Score For Number of Layers and Cake Flavor               1

                              The MEANS Procedure

                        Analysis Variable : TasteScore 
 
                  N
                Obs      Range     Median    Minimum    Maximum
                -----------------------------------------------
                 13         22         80         72         94
                -----------------------------------------------


                         Analysis Variable : TasteScore 
 
                        N
            Layers    Obs      Range     Median    Minimum    Maximum
           ----------------------------------------------------------
                 1      8         19         82         75         94

                 2      5         20         75         72         92

                 3      0          .          .          .          .
           ----------------------------------------------------------


                        Analysis Variable : TasteScore 
 
                         N
         Flavor        Obs      Range     Median    Minimum    Maximum
         -------------------------------------------------------------
         Chocolate       8         20         81         72         92

         Vanilla         5         21         80         73         94
         -------------------------------------------------------------


                        Analysis Variable : TasteScore 
 
                               N
    Flavor         Layers    Obs      Range     Median    Minimum    Maximum
    ------------------------------------------------------------------------
    Chocolate           1      5          6         83         79         85

                        2      3         20         75         72         92

                        3      0          .          .          .          .

    Vanilla             1      3         19         80         75         94

                        2      2         14         80         73         87

                        3      0          .          .          .          .
    ------------------------------------------------------------------------

Previous Page | Next Page | Top of Page