Date: Fri, 22 Jan 2010 06:47:03 -0500
Reply-To: SAS user <sasuser4@GOOGLEMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS user <sasuser4@GOOGLEMAIL.COM>
Subject: Re: Lag function-quarterly data
I have around 800,000 observations.
Here is a sample of the data. I simply want to compute the first lag; for
example the lag value for 006-2000q4 would be 156 and 128 for variable 1
and 2 respectively. Any suggestions will be appreciated.
ID yearqtr variable 1 variable2
006 2000Q1 100 130
006 2000Q2 150 180
006 2000Q3 156 128
006 2000Q4 158 789
006 1999Q1 456 759
006 1999Q2 369 789
006 1999Q3 599 789
006 1999Q4 589 456
005 2000Q1 225 789
005 2000Q2 596 489
005 2000Q3 369 589
005 2000Q4 598 877
|