Forecast function and first order appr.

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Forecast function and first order appr.

Postby JuRa » Tue Dec 08, 2009 12:24 pm

I have Dynare version 4.0.4. When I run this command:
stoch_simul(irf=0,order=1,noprint);
forecast(periods=20);

I get an error meassege:
??? Attempted to access ex(21,:); index out of bounds because size(ex)=[20,1].

Error in ==> simultxdet at 73
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...

Error in ==> forecast at 120
[yf,int_width] = simultxdet(y0,ex,oo_.exo_det_simul,...

Error in ==> Aino_170107_TempVat_ExpII at 1527
info = forecast(var_list_,'simul');

Using the second order appr. however works
stoch_simul(irf=0,order=2,noprint);
forecast(periods=20);

In simultxdet funtion its written lin lines 73-74:
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...
ex(i,:)';

should it be written
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...
ex(i-ykmin,:)';
?

After this change, I can take first order appr. and run forecast. The results seems to be ok. Is there some other problem with this change.
Jukka
JuRa
 
Posts: 6
Joined: Tue May 06, 2008 7:43 am

Re: Forecast function and first order appr.

Postby pakocica » Sat Dec 12, 2009 8:38 am

Dear Yukka,

how do use the exogenous variables in your model, can you send me your code? Don't you use something like e(+1) for an exogenous variable e?

Pavel
pakocica
 
Posts: 46
Joined: Fri Nov 27, 2009 6:42 pm
Location: Taiwan (come from Prague)

Re: Forecast function and first order appr.

Postby SébastienVillemot » Mon Dec 14, 2009 9:06 am

Hi,

Just for your information, the next release of Dynare (4.1) will accept leads and lags on exogenous variables.

Best
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Forecast function and first order appr.

Postby faical » Tue Dec 15, 2009 9:59 pm

Hi

I want to make forecast of a variable say YGAP, I need numbers in my forecast not graphs, Can you give me a hint ? I wrote these lines but It doesn t help


estimation(datafile=mydata,mh_replic=10000,mode_check,nobs=45,forecast=6,IRF=0);

stoch_simul(order=1,nocorr,nomoments) ;

forecast ;


I thank you in advance.
faical
 
Posts: 1
Joined: Sat Nov 14, 2009 7:32 am

Re: Forecast function and first order appr.

Postby JuRa » Wed Dec 16, 2009 10:25 am

viewtopic.php?f=1&t=2376

I'm wondering the same myself in the other topic.

Jukka
JuRa
 
Posts: 6
Joined: Tue May 06, 2008 7:43 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests