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

st: extrapolation using regression

From   kokootchke <[email protected]>
To   statalist <[email protected]>
Subject   st: extrapolation using regression
Date   Tue, 19 Aug 2008 16:14:57 -0400

Dear Stata users,

I have a panel with 150 countries and years from 1965 to 1992. I have a variable "k", whose values by country I need to extrapolate to 1997. The problem is that I don't want to use the extrapolation method that Stata uses with the -ipolate- command. What I want is to run a regression of my variable k on a linear time trend by country, and then use the last "k" available for each country and the estimated beta to "forecast" the value of k for 1997.

One problem, though, is that the availability of k differs by country. For some countries, it is available for the entire sample up to 1992; for others, it is available only until 1990 or 1991; for a few of them, the data are only available until 1985, for example.

How can I extrapolate the values up to 1997 using this idea of a linear time trend and taking into account the data point for the last k available for each country?

I am writing a very complicated program with lots of loops, which seems very inefficient and not too intuitive... and I'm sure there's a better way of doing this... any ideas?

In case you want to see what my data looks like, it's something like this:

country         year        k
ARGENTINA   1965       50
ARGENTINA   1966       52
ARGENTINA   1990       78
ARGENTINA   1991       80
ARGENTINA   1992       81
BOLIVIA        1965       16
BOLIVIA        1966       18
BOLIVIA        1990       28
BOLIVIA        1991       .
BOLIVIA        1992       .

Thank you very much in advance!!

Talk to your Yahoo! Friends via Windows Live Messenger.  Find out how.
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index