Previous Page | Next Page

The MEANS Procedure

Example 9: Computing Different Output Statistics for Several Variables


Procedure features:

PROC MEANS statement options:

DESCEND

NOPRINT

CLASS statement

OUTPUT statement options:

statistic keywords

Other features:

PRINT procedure

WHERE= data set option

Data set: GRADE

This example


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc means data=Grade noprint descend;
 Note about code
   class Status Year;
 Note about code
   var Score FinalGrade;
 Note about code
   output out=Sumdata (where=(status='1' or _type_=0))
          mean= median(finalgrade)=MedianGrade;
run;
 Note about code
proc print data=Sumdata;
   title 'Exam and Course Grades for Undergraduates Only';
   title2 'and for All Students';
run;

Output

 Note about figure
                 Exam and Course Grades for Undergraduates Only                1
                              and for All Students

                                                            Final     Median
   Obs    Status    Year    _TYPE_    _FREQ_     Score      Grade      Grade

    1       1        97        3         3      84.6667    79.3333      73  
    2       1        98        3         3      88.3333    85.6667      80  
    3       1                  2         6      86.5000    82.5000      80  
    4                          0        10      86.0000    83.0000      83  

Previous Page | Next Page | Top of Page