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 (October 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 7 Oct 2004 22:43:29 -0400
Reply-To:     Aj U <apupdh3@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Aj U <apupdh3@YAHOO.COM>
Subject:      Need to find an average

I have data like this:

Date time site occure

01Jan98 00 01 5 01Jan98 01 01 6 01Jan98 02 01 7 01Jan98 03 01 8 01Jan98 04 01 9 01Jan98 05 01 7 01Jan98 06 01 3 01Jan98 07 01 5 02Jan98 05 02 5 02Jan98 06 02 2

and so on.........

I need to find an average of "Occure" by date.

I also need to find a "moving average" of Occure for 3 hours and generate a max from those average.

For example; Occure Time:00+01+02 = 5+6+7/3= 6 Time:01+02+03 = 6+7+8/3= 7 Time:02+03+04 = 7+8+9/3= 8 .......................... Time:05+06+07 = 7+3+5/3= 5 (don't want to add it up for another date, its for each day).

Max of (6, 7, 8 .....5 ) = 8

Something like this.

Anything in proc sql or data steps will be appriciated.

Thanks, Aj


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