Dear Statalisters,
I have a problem with the lag operator:
*****
tsset id time
sort id time
replace X = l.X if X == . & l.X != .
*****
produces the following error:
****
not sorted
r(5);
****
What is the problem with this code? Does *tsset* not ensure that we do not
have to sort and use by... again?
Thanks for your help,
Johannes
----------------------
Johannes Geyer
Deutsches Institut f�r Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research
Department of Public Economics
DIW Berlin
Mohrenstra�e 58
10117 Berlin
Tel: +49-30-89789-258
*
* 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/