Direct Forecasting

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

Harvard
Posts: 5
Joined: Wed Nov 19, 2008 1:50 pm

Direct Forecasting

Postby Harvard » Wed Nov 19, 2008 3:51 pm

Hello colleagues,

i want to forecast a sample not by iteration, but direct. This means for example, that my AR model looks like this: y(5) c y(-1) y(-2), if the forecast horizon is 5. Because Eviews is not able to forecast it by the commands "fit" or "forecast", I have to program it. Has anybody an idea, how it could look like?

Thanks and greetings

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11408
Joined: Tue Sep 16, 2008 5:38 pm

Re: Direct Forecasting

Postby EViews Gareth » Wed Nov 19, 2008 3:54 pm

I don't follow what you mean by this.

You want to estimate Y(5) without estimating Y(4), Y(3), Y(2), Y(1)? If so, then what value do you wish to use for Y(-1) Y(-2)? If you want to use the true values, then a "fit" will do it.
Follow us on Twitter @IHSEViews

startz
Non-normality and collinearity are NOT problems!
Posts: 3178
Joined: Wed Sep 17, 2008 2:25 pm

Re: Direct Forecasting

Postby startz » Wed Nov 19, 2008 6:36 pm

Harvard wrote:Hello colleagues,

i want to forecast a sample not by iteration, but direct. This means for example, that my AR model looks like this: y(5) c y(-1) y(-2), if the forecast horizon is 5. Because Eviews is not able to forecast it by the commands "fit" or "forecast", I have to program it. Has anybody an idea, how it could look like?

Thanks and greetings


Forecast doesn't work with leads and lags. But you could do

Code: Select all

series x=y(5)
ls x c x(-6) x(-7)

Harvard
Posts: 5
Joined: Wed Nov 19, 2008 1:50 pm

Re: Direct Forecasting

Postby Harvard » Wed Nov 19, 2008 11:27 pm

Hello,

the idea "series x=y(5), ls x c x(-6) x(-7)" sounds great. I will try it and post if it works.

Thanks very much

Harvard
Posts: 5
Joined: Wed Nov 19, 2008 1:50 pm

Re: Direct Forecasting

Postby Harvard » Thu Nov 20, 2008 6:11 am

Dear colleagues,

it works.

Thanks again for the great idea.
Greetings from Germany


Return to “Programming”

Who is online

Users browsing this forum: sudesh and 8 guests