Statalist The Stata Listserver


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

st: re: generating lagged growth rate in panel data


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: generating lagged growth rate in panel data
Date   Thu, 24 May 2007 08:10:40 -0400

sacrificial cappucino machine

Jeff said

I wish to compute a semi-log growth rate for the variable <approp> for
each <unitid>. More specifically, for each <unitid> and <year> combination
within the panel, I wish to compute a semi-log growth rate for the
variable <approp> for the trailing three year period beginning two years
in the past. As such, the first non-missing growth rate in the panel would
appear in 1990 for each <unitid>, and be computed by regressing the log of
<approp> for that <unitid> over the three year period between 1988 and
1985. The growth rate for <approp> in 1991 for each <unitid> would then be
computed by regressing the log of <approp> for that <unitid> over the
three year period between 1989 and 1986... and so forth and so on.


ssc install rollreg
webuse grunfeld,clear
g linvest = log(invest)
rollreg linvest time, move(3) stub(jeff)
g double invdotf2 = L2.jeff_time
l company time jeff_time invdotf2


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


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