Statalist The Stata Listserver


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

Re: st: computing growth rates by country


From   "Daniel Hoechle" <[email protected]>
To   [email protected]
Subject   Re: st: computing growth rates by country
Date   Tue, 16 May 2006 19:58:32 +0200

Sumiter,

Try something like

gen lngdp=ln(gdp)
bys country: gen lngrowth = lngdp-lngdp[_n-1]
bys country: egen avg_lngrowth = mean(lngrowth)

Best,
Daniel

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