Procedure features: |
PROC MEANS statement options:
|
CLASS
statement |
OUTPUT statement options:
|
|
Other features: |
PRINT procedure |
WHERE= data set option |
|
Data set: |
GRADE
|
This example
-
suppresses the display of PROC MEANS output
-
stores the statistics for the class level and
combinations of class variables that are specified by WHERE= in the output
data set
-
orders observations in the output data set by
descending _TYPE_ value
-
stores the mean exam scores and mean final grades
without assigning new variables names
-
stores the median final grade in a new variable
-
displays the output data
set.
|
options nodate pageno=1 linesize=80 pagesize=60; |
|
proc means data=Grade noprint descend; |
|
class Status Year; |
|
var Score FinalGrade; |
|
output out=Sumdata (where=(status='1' or _type_=0))
mean= median(finalgrade)=MedianGrade;
run; |
|
proc print data=Sumdata;
title 'Exam and Course Grades for Undergraduates Only';
title2 'and for All Students';
run; |
|
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
| |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.