Statalist


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

st: Time series with moving average growth rate


From   Marcello Pagano <[email protected]>
To   [email protected]
Subject   st: Time series with moving average growth rate
Date   Tue, 03 Jun 2008 10:36:26 -0400

*************************

Dear list members,

I have time series data (2000-2007) on crop yield for three countries. I would like to calculate 3-year moving average growth rate for each country, i.e. one year increase in every subsequent period (e.g. 2000-02, 2001-03,.....2005-07). My equation is log(yield) = a + b(time). The growth rate is (b*100). I would like to write a loop command or any other procedure which produce 3-year moving average growth rate for entire period ( six values in this case) for each country. I would be grateful if anyone from this list can help me in this regard. The hypothetical data is given below.


Year country1 country2 country3

2000 1.6 1.1 1.8

2001 1.7 1.2 1.9

2002 1.9 1.1 2.0

2003 2.1 1.3 2.1

2004 2.4 1.5 2.6

2005 2.7 1.8 2.5

2006 3.1 2.1 2.9

2007 3.5 2.3 3.2



Sincerely,

Humnath Bhandari,

IRRI, Philippines

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