Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Unable to create lag variables in a panel dataset


From   Richard J Stoll <[email protected]>
To   [email protected]
Subject   Re: st: Unable to create lag variables in a panel dataset
Date   Fri, 14 Aug 2009 11:51:21 -0500 (CDT)

On Fri, 14 Aug 2009, Jabr, Wael M wrote:

>
> I thought there might be something wrong in my dataset and tried to use
> webuse abdata
> sort id year
> tsset id year
> (or xtset id year)
>

There may be an issue with your dataset, but there is nothing wrong with
what happened with abdata.

Abdata has 140 IDs.  You get a missing value for the first case for each
id (because there is no lag for that id prior to the first case.

------------------------------------------------------------------------
Richard J. Stoll * Professor of Political Science * Rice University
Dept. Political Science MS 24 * P.O. Box 1892 * Houston TX 77251-1892
E-mail: [email protected] * Tel: 713-348-3362 * FAX: 713-348-5273

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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