Page 1 of 1

Eviews 8: Extrapolation

Posted: Sat Jun 13, 2015 2:40 pm
by Daniel351
Hi guys,
right now I am working on panel data
with 80 countries as cross-sections and
each country with data either starting from 1959 or starting from 1964, going until 2009 in 5 year periods

Now, my problem is the following: for one of the variables, there is missing data for each country until about 1971, however, the paper i am repeating, says that they extrapolated the missing data. The variables I am talking about are changing very slowly over time (democracy indicator and rule of law), so I thought that it would be easiest / best to "extrapolate" by simply taking the last value, or taking the avg over the last couple of values. If any of these two methods results in values, that are too far off from the existing series, I would consider linear extrapolation...

But I cannot find out how to do any of this in Eviews.

Thanks in advance for your help :D

Re: Eviews 8: Extrapolation

Posted: Sun Jun 14, 2015 4:46 am
by EViews Gareth
Just to be clear, you have data available from 1971 onwards, and want to extrapolate backwards in time to 1966, 1961 etc...

Re: Eviews 8: Extrapolation

Posted: Sun Jun 14, 2015 5:22 am
by Daniel351
Well, I have several variables. For most of them I have data for each country starting from 1959 or 1964 until 2009.
For the two variables I am actually talking about in the above post, there I have data starting from about 1971. So I need to extrapolate the missing parts.

So, to answer your question: yes, I have data from 1971 onwards and I want to extrapolate backwards

Re: Eviews 8: Extrapolation

Posted: Sun Jun 14, 2015 5:37 am
by EViews Gareth
Something like:

Code: Select all

smpl @first 1970 genr(r) x = x(1)

Re: Eviews 8: Extrapolation

Posted: Sun Jun 14, 2015 6:35 am
by Daniel351
This is working, but only for the very first year... Now I have values from 1970 onwards
Can I make it work for all years at once?

I tried changing it a little bit:

Code: Select all

smpl @first 1971 genr (r) r=r(8)
These commands seem to have mirrored all the values around 1970. So at 1969 there is the value for 1971; at 1968 the value for 1972; etc.

Re: Eviews 8: Extrapolation

Posted: Sun Jun 14, 2015 5:23 pm
by EViews Gareth
Ah, good point.

Try:

Code: Select all

smpl @first 1971 x = @recode(x=na, @firstsby(x, country), x)

Re: Eviews 8: Extrapolation

Posted: Thu Jun 18, 2015 1:11 pm
by Daniel351
Thanks Gareth,
this worked :D !!