forecast

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

Postby twlxv » Thu Aug 10, 2006 10:05 am

Dear all,

I try to run a recursive forecast with the following command:

estimation(datafile=trial27_dat,nobs=([86:87]),mh_replic=2000,mh_nblocks=2,mh_jscale=0.41,presample=4,mode_check,forecast=2,mode_file=trial27_mode,nodiagnostic);

But each time, when dynare tries to do the forecast after the last estimation (in this case, the estimation with 87 data points), I obtain the following error message when dynare tries to plot the forecast graphs:

MH: Out of sample forecasts...
Period = 1
Period = 2
MH: Out of sample forecasts, done!

??? Index exceeds matrix dimensions.

Error in ==> <a href="error:C:\dyn_mat_v3_064\dynare_v3\matlab\dynare_estimation.m,1301,1">dynare_estimation at 1301</a>
plot(1:k,data2(k2,end-k+1:end,k2)','-k','linewidth',2);

Error in ==> <a href="error:C:\Taiwan_project\real\baseline\separable\trial27\trial27.m,387,1">trial27 at 387</a>
dynare_estimation(var_list_);

Error in ==> <a href="error:C:\dyn_mat_v3_064\dynare_v3\matlab\dynare.m,26,1">dynare at 26</a>
evalin('base',fname) ;


I have a total of 95 data points, so I don't see any reason there is a problem of index exceeding matrix dimension... Does anyone know why this might happen?
The curious thing is that when dynare runs the first estimation with 86 data points, it has no problem plotting the forecast graph... it is always a problem with the last estimation (for instance if I change nobs=([85:87]), it is still the estimation with 87 data points that have the problem...

Also, does anyone know what the two green lines and the two red lines in the forecast graphs correspond to? The blue line should be the data, right?

Thanks.

Regards,

Wing
twlxv
 
Posts: 8
Joined: Thu Mar 24, 2005 4:57 pm

Postby MichelJuillard » Thu Aug 10, 2006 1:01 pm

Dear Wing,

can you post your example with the data, please?

The blue line is the mean forecast. The green lines are a 90% confidence interval taking into account the posterior uncertainty about parameters. The red lines a confidence interval taking into account in addition to the above the future shocks

Best wishes

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby twlxv » Thu Aug 10, 2006 2:48 pm

Dear Michel,

Attached are the files. Thanks a lot.

Regards,

Wing
Attachments
trial27_dat.m
(6.58 KiB) Downloaded 225 times
trial27.mod
(4.13 KiB) Downloaded 346 times
twlxv
 
Posts: 8
Joined: Thu Mar 24, 2005 4:57 pm

Postby MichelJuillard » Thu Aug 10, 2006 3:31 pm

Thanks, I will get back to you in a few days

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby MichelJuillard » Thu Aug 24, 2006 1:00 pm

There was indeed a bug. I corrected it under SVN. It should be available in the snapshot for version 4 tomorrow.

Kind regards

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby MichelJuillard » Sun Oct 15, 2006 3:25 pm

Dear Wing,

I finally found the time to look at your program. Sorry about the delay.
With the last version of the snapshot for version 3, it runs without an error.

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests