Date: Thu, 25 Aug 2011 16:29:53 -0400
Reply-To: sas8832@HOTMAIL.CO.UK
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: sas8832@HOTMAIL.CO.UK
Subject: Re: Lag values
panel dataset
id year quarter variablex lag_variablex
1 2000 1 10 .
1 2000 2 5 10
1 2000 3 . 5
1 2000 4 20 .
When variablex is missing for the previous quarter, i want lag_variablex=.
rather than equal to the previous available value for variable x. I have
already filled holes (ie missing quarters).
Thanks
|