Forecasting with SSpace

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Forecasting with SSpace

Postby fmgoto » Wed Apr 14, 2010 12:22 pm

Hi, I have defined a given SSpace and I am trying to forecast 3-periods ahead with observed explanatory variables. However, it seems that Eviews does not forecast if the SSpace's signal contains lagged dependent variable.

KALMAN.APPEND @SIGNAL LOG(Y) = SV1 + SV2 * LOG(Y(-1))
KALMAN.APPEND @STATE SV1 = SV1(-1) + [VAR=EXP(C(0))]
KALMAN.APPEND @STATE SV2 = SV2(-1)

Is this so? Any idea on how to accomplish the forecast?

Thanks.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Forecasting with SSpace

Postby EViews Glenn » Wed Apr 14, 2010 1:37 pm

I'm not sure why this doesn't work for you. What is the error message that you get...

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Re: Forecasting with SSpace

Postby fmgoto » Thu Apr 15, 2010 5:18 am

Glenn, I got no error. I just didnt get the result I expected.

Given that I do have "x" until 2010m03, I was expecting to get "y_hat" until 2010m03 and not 2009m12. Isnt that so? Why?

Thank You, Fabio

Code: Select all

smpl 2000m01 2009m12 sspace KALMAN15 KALMAN15.append @signal log(y) = sv10 + sv_ar1 *log(y(-1)) + sv11*dlog(x) KALMAN15.append @state sv10 = sv10(-1) + [var = exp(c(10))] KALMAN15.append @state sv_ar1 = sv_ar1(-1) KALMAN15.append @state sv11 = sv11(-1) KALMAN15.ml smpl 2000m01 2010m12 KALMAN15.forecast(i=o, m=n) @signal y_hat @state sv10_in sv_ar_in sv11_in

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Forecasting with SSpace

Postby EViews Glenn » Thu Apr 15, 2010 9:53 am

It's hard to say without seeing your data, but I will note that the following paragraph from the manual may be relevant here
Signal equations may not contain current values or leads of signal variables. You
should be aware that any lagged signals are treated as predetermined for purposes of
multi-step ahead forecasting (for discussion and alternative specifications, see Harvey
1989, p. 367-368).

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Re: Forecasting with SSpace

Postby fmgoto » Tue Apr 20, 2010 11:11 am

Thank You!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests