LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 May 2007 12:45:51 -0700
Reply-To:     Floyd Moseby <floydmoseby@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Floyd Moseby <floydmoseby@GMAIL.COM>
Subject:      PROC MEANS classes, by-variables, or both?
Comments: To:
Content-Type: text/plain; charset="iso-8859-1"

Hi folks, this is my first post to this group. I'm a new SAS programmer (not a student), and could use some advice.

I am working on some very basic performance analysis within my department. Let's assume that my table has 5 variables in the following order:

Team (character) Date (character) Head_Count (numeric...cannot be character) Files_Processed (numeric) Errors_Produced (numeric)

I need to write a PROC MEANS procedure that displays the mean values of Files_Processed and File_Errors, by Team and Head_Count. However, the Head_Count variable fluctuates over time, and I need to report the average values in chronological order. My intended output should and will have repeat values for Head_Count by team, but must be output in chronological order despite the Date variable being NOT present.

Here's a quick example; please forgive the formatting:

[TEAM] [DATE] [H_C] [F_P] [E_P] ABC 20050714 18 125 32 ABC 20050715 18 136 35 ABC 20050716 14 92 20 ABC 20050717 14 98 16 ABC 20050718 18 118 38 ABC 20050719 18 126 37

My output table should look like this:

[TEAM] [SEQ] [H_C] [F_P] [E_P] ABC 01 18 130.5 33.5 ABC 02 14 95 18 ABC 03 18 122 37.5

The date variable will lose its relevance, but I'll still need a variable to describe the chronological order of the particular mean values by Team and by Head_Count. I've tried variations of the following:

PROC MEANS DATA=Metrics NORPRINT MEAN; CLASS Head_Count; BY Team; VAR Files_Processed Errors_Produced; OUTPUT OUT=Performance (drop= _TYPE_) mean=; RUN;

However, I still get the mean values displayed in ascending order by Team by Head Count. I'm having a tough time finding references to similar problems online and in print.

Does any know how I can resolve this part of my code? I appreciate any help you can offer!

Floyd Moseby

Back to: Top of message | Previous page | Main SAS-L page