Procedure features: |
PROC MEANS
statement option:
|
CLASS statement |
OUTPUT statement options
|
statistic
keywords |
|
IDGROUP |
|
LEVELS |
|
WAYS | |
|
Other features: |
|
Data set: |
GRADE
|
This example
-
suppresses the display of PROC MEANS output
-
stores the average final grade in a new
variable
-
stores the name of the student with the best final
exam scores in a new variable
-
stores the number of class variables are that
are combined in the _WAY_ variable
-
stores the value of the class level in the _LEVEL_
variable
-
displays the output data set.
|
options nodate pageno=1 linesize=80 pagesize=60; |
|
proc means data=Grade noprint; |
|
class Status Year; |
|
var FinalGrade; |
|
output out=sumstat mean=AverageGrade
idgroup (max(score) obs out (name)=BestScore)
/ ways levels;
run; |
|
proc print data=sumstat noobs;
title1 'Average Undergraduate and Graduate Course Grades';
title2 'For Two Years';
run; |
|
Average Undergraduate and Graduate Course Grades 1
For Two Years
Average Best
Status Year _WAY_ _TYPE_ _LEVEL_ _FREQ_ Grade Score _OBS_
0 0 1 10 83.0000 Branford 2
97 1 1 1 6 83.6667 Jasper 10
98 1 1 2 4 82.0000 Branford 2
1 1 2 1 6 82.5000 Branford 2
2 1 2 2 4 83.7500 Abbott 1
1 97 2 3 1 3 79.3333 Jasper 10
1 98 2 3 2 3 85.6667 Branford 2
2 97 2 3 3 3 88.0000 Abbott 1
2 98 2 3 4 1 71.0000 Crandell 3
| |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.