Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: XT LAGS


From   "Marina Balboa" <[email protected]>
To   <[email protected]>
Subject   st: Re: XT LAGS
Date   Mon, 20 Jun 2005 13:26:18 +0200

Hi,

the command generate xlag=L.x would have to work. I think this is what you want.

Best,
Marina

----- Original Message ----- From: <[email protected]>
To: <[email protected]>; <[email protected]>
Sent: Monday, June 20, 2005 2:22 AM
Subject: st: XT LAGS




Does anyone know how can I create lags when I am using a long format xt
dataset eg:
Id year var1 var2 ......
12 1
12 2
12 3
12 4
13 1
13 2
13 3
13 4
If I use the command generate xlag= x[_n-1] then this will only create one
missing value at the first observation for the individual with the personal
identification mumber 12 and none for the rest- hence -this mixes up
different individuals' observations.
Can anyone help?
George

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index