|Date: ||Fri, 29 May 2009 08:49:35 -0400|
|Reply-To: ||Randall Powers <powers_r@BLS.GOV>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Randall Powers <powers_r@BLS.GOV>|
|Subject: ||need a sas function analagous to LAG function|
I am familiar with the LAG function. It allows you to use a value of a
variable from the previous observation in hte calculation of a value of a
variable for the current observation.
What I need to to is if there is a function which allows you to take a
value of a variable in the NEXT observation and use it in operations on the
current observation. If so, what is it?
For example, I want to take the value of the variable UNIT in from the
observation that follows my current one and assign it to a new variable in
the current observation.
if unit='.' then unit1=next(unit);
I don't think "next" is what i want, but what is?