Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: using lags within -xi-

From   Scott Cunningham <>
Subject   st: using lags within -xi-
Date   Tue, 22 Aug 2006 14:18:49 -0400

I've a panel with 20 years. I want to estimate a dynamic model with fixed effects, and thought I could just use the L.depvar operator within -xtreg-, but I'm not having much luck. The -xi- manual ("Cross-Sectional Time Series") is not all that helpful under -xtreg- on including lags, making me wonder if it is not within -xtreg- where you implement lags. I tried generating, but that's not straightforward either, as I appear to be only successful at lagging across cross-sectional observations (-gen lm1=mir[_n-1]- will, I think, not lag by year, but by cross-sectional observation, and Stata doesn't recognize [_t-1]). I tried using the L.vbl and L2.vbl, but it keeps telling me my data is not sorted, which subsequent sorting along various lines (sort year, sort variable year, sort year variable - none work).

I only have three help volumes here with me at work - Stata 8 -xi-, Reference A-F, and Graphics. The program I'm running is Stata 9.2, but my manuals are all Stata 8. *
* For searches and help try:

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