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

st: RE: XT LAGS


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: XT LAGS
Date   Mon, 20 Jun 2005 12:24:36 +0100

. help tsset 

and look at linked sections in the help and the 
manual. 

You won't be able to do anything useful with 
xt data until you learn this material. 

Nick 
n.j.cox@durham.ac.uk 

gmc107@york.ac.uk
 
> 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.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index