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 (August 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 31 Aug 2007 06:08:57 +0000
Reply-To:     Jindan Zhou <jindan@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jindan Zhou <jindan@GMAIL.COM>
Subject:      How to calculate on selected observation and assign the result to
              a variable?
Content-Type: text/plain; charset=ISO-8859-1

For example, my dataset(all_data) contains the following variables: Class Estimate Class1 2.29375 Class2 2.77788 Class3 3.30085 Class4 17.81447 Class5 4.57152 Class6 17.93637 Class7 17.85846 Class8 17.85846 Class9 17.93092 Class10 18.01070

How do I calculate, for example, average of Estimate over Class1-Class9 (note Class10 is excluded), and assign the resulted value to a variable AVG?

Further, for AVG, the number of observation is 1, but the original dataset has 10 obs, so likely AVG will be created in another dataset,

Thanks,

Jindan


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