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 (March 2002, 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 Mar 2002 12:04:12 +0100
Reply-To:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject:   Re: a simple question
Comments:   To: Morris <soaring-cato@YAHOO.COM.TW>
Content-Type:   text/plain; charset="big5"

Dear Morris,

First of all (and to everyone posing problems to SAS-L): do not state a subject like "question" or "help", because that is what it is about always. Just describe your problem more to the point, e.g. "processing data and lag".

Secondly, I do not understand what you would want to do with your first problem. I can't see any logic in what you state on point of departure and desired result.

Your second problem can be solved from within a macro by the following lines, replacing your assignments of var 1 to var10: %LOCAL I; %DO I = 1 %TO 10; var&I=lag&I(aa); %END;

Regards - Jim. -- Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070 senior statistician, P.O. Box 1 fax. +31 412 407 080 senior data manager 5350 AA BERGHEM IMRO TRAMARKO: a CRO J.Groeneveld@ITGroups.com the Netherlands in clinical research

My computer beeps when it complains; I complain when it beeps

Notice of confidentiality: this e-mail may contain confidential information intended for the addressed recipient only. If you have received this e-mail in error please delete this e-mail and please notify the sender so that proper delivery can be arranged.

> -----Original Message----- > From: Morris [SMTP:soaring-cato@YAHOO.COM.TW] > Sent: Thursday, March 07, 2002 8:26 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: a simple question > > hi..everyone > i have some problem in my report .can anyone tell me > how to do, > > first problem is that i have two data set,average of > > var in first is inital value in second data set. > > ex. > Obs var1 > 1 10 > 2 50 > 3 30 > > average of var1 is 45 > > then there is a new var3 in second(var2 is given) > > obs var2 var3 > 1 20 65...........20+45 > 2 55 120...........65+55 > 3 70 190...........120+70 > > and do any efficient method to do this process? > > > second is that i want some new variables("aa" is > given) > ex. var1=lag(aa); > var2=lag2(aa); > .... > var10 =lag10(aa); > > and do any efficient method to do this process? > > Many thanks > > Sincerely > > Morris Hu > > ----------------------------------------------------------------- > < ¨C¤Ñ³£ Yahoo!©_¼¯ > www.yahoo.com.tw


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