Page 1 of 1

Forecast after estimation

PostPosted: Wed Dec 11, 2013 3:51 am
by LSHui
Hi, all

I am struggling to do forecast based on Adolfson's DSGE model.

I run estimation first with the following command, and it takes 5 hours....

estimation(datafile=data_2013Q2v2,plot_priors=0,mh_drop=0.5,solve_algo=6,mode_compute=6,mh_replic=100000,mh_nblocks=1,mh_jscale=0.34);

After estimation has been done, then I run another file, only do forecast with following command:

estimation(datafile=data_2013Q2v2,plot_priors=0,mode_compute=0,mode_file=BARRIE_estim_13Q2v3_mode,forecast=25,mh_replic=0,nograph);

I think it is time-saving. But I am not sure Is this right? the forecast can be done properly?

Much appreciated!

Helen

Re: Forecast after estimation

PostPosted: Wed Dec 11, 2013 9:29 am
by StephaneAdjemian
Hi Helen,

You probably need to add the option load_mh_file to use the draws from the (previous) MCMC, otherwise the point forecast will computed with the posterior mode. Using the MCMC draws, Dynare will report the posterior mean of the forecast with intervals reflecting uncertainty coming from future shocks and the estimation.

Best,
Stéphane.

Re: Forecast after estimation

PostPosted: Thu Dec 12, 2013 2:16 am
by LSHui
Thank you very much, Stéphane!
I didn't expect you reply so quick as I know you are busy and you do these in your free time. THANKS!

After I add load_mh_file to estimation, the following error shows:

Error using load
Unable to read file
BARRIE_estim_13Q2v4/metropolis/BARRIE_estim_13Q2v4_mh52_blck2.mat: No such file or
directory.

Error in metropolis_draw (line 68)
load( [ fname '_mh' int2str(MhFilNumber) '_blck' int2str(ChainNumber) '.mat'
],'x2','logpo2');

Error in GetOneDraw (line 36)
[xparams, logpost] = metropolis_draw(0);

Error in prior_posterior_statistics (line 206)
[x(b,:), logpost(b,1)] = GetOneDraw(type);

Error in dynare_estimation_1 (line 903)
prior_posterior_statistics('posterior',data,gend,data_index,missing_value);

Error in dynare_estimation (line 62)
dynare_estimation_1(var_list,varargin{:});

Error in BARRIE_estim_13Q2v4 (line 1403)
dynare_estimation(var_list_);

Error in dynare (line 132)
evalin('base',fname) ;

There is a similar topic about this error in the forums, but haven't get solution. (viewtopic.php?f=1&t=5155&p=13334&hilit=load+mh+file#p13334)

I post mod file and data set here, could please help me check it anytime when you are available. Much much appreciated!

Helen