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

Re: st: xtreg with lag


From   Scott Cunningham <[email protected]>
To   [email protected]
Subject   Re: st: xtreg with lag
Date   Tue, 18 Oct 2005 07:35:00 -0400

On Oct 18, 2005, at 4:38 AM, Dirk Nachbar wrote:

Dear all

I want to do a panel regression where I have also a lag on the rhs of the equation, but trying


xtreg y l.y


doesn't work. also i cannot generate a lag variable. how should i do it?


thanks


Dirk Nachbar
You probably know this, but if you're using fixed effects, then including a lag of the dependent variable is going to violate the strict exogeneity assumptions required for consistent estimates. You may want to look into Arrelano and Bond's dynamic GMM estimator, (- xtabond- in Stata).

But, if you want to run -xtreg- with lagged dependent variables, then you can always generate a variable for those lags. I think the command would be - gen ly=[_n-1] - or something like that.


scott
*
* 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