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

st: RE: panel regression with lagged dependent variable


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: panel regression with lagged dependent variable
Date   Sat, 3 Jul 2004 07:41:25 -0500

Andy,

I would imagine that Stata believes the frequency of your data is yearly,
not every five years.  One solution would be to create a new time variable
with consecutive values.  For example:

bysort country (year): gen time = _n

and then -tsset country time-

Or you could construct your lagged variable by taking account of the 5 year
gap between observations:  -gen lagged_var = l5.var-


Hope this helps,
Scott
 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of A.S. Feng
Sent: Saturday, July 03, 2004 7:17 AM
To: [email protected]
Subject: st: panel regression with lagged dependent variable

Dear Listers,

I have panel data on 6 periods (1960, 1965...1985) and 138 countries.

I am trying to run a Fixed Effects regression with lagged dependent 
variable (despite knowing there will be correlated effects).

How do I construct the lagged dependent variable? I tried 

gen lagy= l.y

but it gave me missing values for all observations.

What am i doing wrong?

Thanks a lot.

Andy
*
*   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/

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