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 (July 2005, 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 Jul 2005 23:44:51 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: proc means tip

Yes, MEANS and SUMMARY can be easy to use.

The statistic specifications are part of the OUTPUT statement, so lose the semicolon on the line starting with "output".

When only one stat is requested, you don't even need the AUTONAME option. A simple

output out = yy sum=;

will sum all of the numerics and use the names of the original variables in the output data set. Often that is acceptable, or even desired.

AUTONAME really comes into its own when you call for two or more stats. Then it generates distinct names where otherwise doing so would be a coding task.

output out = yy sum= min= max= / autoname;

On Thu, 7 Jul 2005 15:28:52 -0700, David Fickbohm <davefickbohm@YAHOO.COM> wrote:

>People, >I have found a way to easily run a statistic against many varibables. >proc means data = xx; >by var(s); >output out = yy; >sum= / autoname; >run; >This will sum all numeric variables. It will add _sum to the end of each variable in the output dataset. I would assume it works with other statistics. Though I have not tested any. > >I have found it useful. > > > >Dave Fickbohm >Use Technology to the Fullest >1250 45th st suite 200 >Emeryville, CA, 94608 >510 594 4151 voice > >--------------------------------- > Sell on Yahoo! Auctions - No fees. Bid on great items.


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