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 (January 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Jan 2006 03:22:37 -0500
Reply-To:     "SASsy :-)" <sas__l@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "SASsy :-)" <sas__l@HOTMAIL.COM>
Subject:      Re: get the former period value

On Wed, 4 Jan 2006 00:14:30 -0800, ljmpll@SOHU.COM wrote:

>In SAS, we can get a lag period value of variant X by the function >lag(X). > Such as: > >X Lag period value > >20 >44 20 >23 44 >18 23 >13 18 >12 13 >63 12 >13 63 >11 13 >18 11 >13 18 > >But How can we get the former period value of variant X? >(i,e. I want to get the follwing result) > >X the former period value > > 20 >20 44 >44 23 >23 18 >18 13 >13 12 >12 63 >63 13 >13 11 >11 18 >18 13 > >What programs should I write? >Thanks !

It is exactly the same, the only thing you need to do is rename the two columns! ;-)

S


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