Statalist


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

Re: st: extrapolation using regression


From   "Scott Merryman" <[email protected]>
To   [email protected]
Subject   Re: st: extrapolation using regression
Date   Wed, 20 Aug 2008 19:07:45 -0500

-tsappend, add(5)-

-xi: reg k i.country*year-

-predict khat-

Scott

On Tue, Aug 19, 2008 at 3:14 PM, kokootchke <[email protected]> wrote:
> 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?
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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