Chapter Contents

Previous

Next
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

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
The OUT= output data set contains only observations for the combination of both class variables, Flavor and Layers. Therefore, _TYPE_ contains the binary character string 11. The observations are ordered by ascending frequency of Flavor. The missing value in Layers is a valid value for this class variable. PROC MEANS excludes the observation with the missing flavor because it an invalid value for Flavor. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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