Date: Thu, 9 Nov 2006 19:25:16 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: Looking for a function similar tio LAG1... or LAG<n>
Content-Type: text/plain; charset="us-ascii"
Sorting is not necessary. One way is to use direct access reversely or
point access, then use direct access reversely again. The other way is
to use two set statements with one using direct access or point access.
> Hi there,
> I would like to obtain the same result as LAG(-1)(old).... any help?... but I would not like to use the: proc sort data=sasdataset; by descending _n_; and then apply newvar=lag1(oldvar)
> Thanks in advance.