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 (June 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Jun 2008 19:59:02 -0700
Reply-To:     Andrew H Karp <sfbay0001@AOL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andrew H Karp <sfbay0001@AOL.COM>
Organization: http://groups.google.com
Subject:      Re: PROC MEANS
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=UTF-8

I have two user group presentations I often give about PROC MEANS. Both are avaialble for free download from the "user gruop presentations" section of www.sierrainformation.com. Hope these help!

Andrew

Andrew Karp Sierra Information Services www.SierraInformation.com

On Jun 9, 11:47�am, Carol <caroline5...@yahoo.com> wrote: > On Jun 9, 10:34�am, tobyd...@HOTMAIL.COM (toby dunn) wrote: > > > > > > > Carol , > > > Unless there is more to this data step then this hunk of code is utterly useless: > > > data meaninput; > > set combo; > > > id also add a run statement to it. > > > This: > > mean(rtn1-rtn&tot_fact)=factor1-factor&tot_fact; > > > This is simply creating a mean for variables: �RTN1 to RTN(N) > > > Where (N) is derived from the value held in the macro variable &Tot_Fact. > > So if Tot_Fact has a value of say 5 it would create a mean for RTN1 to RTN5. > > Factor1-Factor&Tot_Fact is simply naming the means on the out put file. > > Such that the mean of RTN1 will be held in variable Factor1 on the output file. > > > The reason a macro variable and all this is even needed is poor data structure. �If the file were structured in a normalized form the whole process could be simplified, run faster, and well would require a macro variable. �The whole thing looks like something done by a begginer programmer with a poor understanding of data structure and SAS's underlying algorithms. �The good thing is it is easy to fix with a small rewrite. > > > Toby Dunn > > > "Don't bail. The best gold is at the bottom of barrels of crap." > > Randy Pausch > > > "Be prepared. Luck is where preparation meets opportunity." > > Randy Pausch > > > > Date: Mon, 9 Jun 2008 08:22:31 -0700 > > > From: caroline5...@YAHOO.COM > > > Subject: PROC MEANS > > > To: SA...@LISTSERV.UGA.EDU > > > > I have code of proc means as below, > > > > /*compute means*/ > > > data meaninput; > > > set combo; > > > > proc means noprint data=meaninput; > > > output out=meano > > > mean(rtn1-rtn&tot_fact)=factor1-factor&tot_fact; > > > > But I could not catch the meaning of code of " mean(rtn1- > > > rtn&tot_fact)=factor1-factor&tot_fact;", what the author tried to > > > express here? > > > > Does the first the two row code of > > > proc means noprint data=meaninput; > > > output out=meano > > > > could make a clear without the third row? > > > _________________________________________________________________ > > Search that pays you back! Introducing Live Search cashback.http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=src...Hide quoted text - > > > - Show quoted text - > > Thanks lots for all of your reply to my question. > > I'm not quite familiar with data structure and SAS's underlying > algorithms, as Toby mentioned above. So could I expect any suggestions > from you? any book related to this area? > > Thank you!- Hide quoted text - > > - Show quoted text -


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