I am using Dynare 4 to perform estimation since it runs much faster than version 3 (great).
However, I find it difficult to perform post-estimation analysis since I cannot find a way to load estimated parameters and shocks in order to perform simulations, historical decompositions, and impulse response analysis. Suppose x is the only parameter I have to estimate in a model. With Dynare 3, in the mod file I would simply do things like:
x=1;
load model_mode.mat;
x=model_mode(1);
and assign to x the value at the mode (which would override the parameter value x=1 previously given), just to give an example. It seems that Dynare 4 does not allow me to do so, even if add the last two lines x remains equal to 1.
I don’t know much of version 4 either but I do not have any problem to recover the estimation results. May be I am understanding your question wrong.
All the estimation results are stored in the structure “oo_”. Amongst them you have the posterior mode of parameters “oo_.posterior_mode.parameters” or shocks standard deviation “oo_.posterior_mode.shocks_std”. The smoothed shocks are stored under “oo_.SmoothedShocks” and the filtered variables under “oo_.SmoothedVariables”
Now let me ask you a question about v4.
I have tried to use the same procedure as in v3 to provide the mode instead of estimating it and something does not work. If I write:
“estimation(datafile=data,mode_file=manual_mode,mode_compute=0,mh_replic=0,mh_nblocks=1,mh_jscale=0.02);“
This works in v3, but in v4 I get a message like:
”??? Error using ==> load
Unable to read file MEDEA_linear_est_v4_sinbW/metropolis/MEDEA_linear_est_v4_sinbW_mh_history: No such file or directory.”
It seems like it is not enough with the mode but also needs the MH replications history. Do you know why?
All the estimation results are stored in the structure “oo_”. Amongst them you have the posterior mode of parameters “oo_.posterior_mode.parameters” or shocks standard deviation “oo_.posterior_mode.shocks_std”. The smoothed shocks are stored under “oo_.SmoothedShocks” and the filtered variables under “oo_.SmoothedVariables”
[/quote]
Hi Pablo. The problem I have with Dynare4 - and I do not have with Dynare 3 - is that if I want to do simulation or variance decomposition or impulse response analysis after estimation I need to enter manually these values in my mod file, because the mod file for Dynare 4 does not seem to accept standard matlab commands (like calling another file containing the estimated parameters in excel, say…)
[quote=“pburriel”]
Now let me ask you a question about v4.
I have tried to use the same procedure as in v3 to provide the mode instead of estimating it and something does not work. If I write:
“estimation(datafile=data,mode_file=manual_mode,mode_compute=0,mh_replic=0,mh_nblocks=1,mh_jscale=0.02);“
This works in v3, but in v4 I get a message like:
”??? Error using ==> load
Unable to read file MEDEA_linear_est_v4_sinbW/metropolis/MEDEA_linear_est_v4_sinbW_mh_history: No such file or directory.”
It seems like it is not enough with the mode but also needs the MH replications history. Do you know why?
Thanks,
Pablo[/quote]
Dynare 4 - at least my version - seems to have a problem is loading past mh history if you want to add some new draws to some old ones. Other than that, I have never encountered this error message…
I have found a similar problem with dynare v4. The way I got around it is by doing these things in a different matlab file which is called from the dynare file. This is annoying, but works.
I think this beta version of v4 still needs a lot of work in terms of making it compatible with matlab functions. For example until this saturday you could not use fsolve within a dynare v4 code, so you could not solve the non-linear steady state of the model within the v4 code. It seems that this has been sorted now.
About my problem with the mode I have solved it now. Again, the problem was with which matlab functions you call.
I am experiencing the same problem (see below) with Dynare 4, and wonder if anyone have been able to overcome this by now?
[quote=“iacoviel”]Hi Michel
I am using Dynare 4 to perform estimation since it runs much faster than version 3 (great).
However, I find it difficult to perform post-estimation analysis since I cannot find a way to load estimated parameters and shocks in order to perform simulations, historical decompositions, and impulse response analysis. Suppose x is the only parameter I have to estimate in a model. With Dynare 3, in the mod file I would simply do things like:
x=1;
load model_mode.mat;
x=model_mode(1);
and assign to x the value at the mode (which would override the parameter value x=1 previously given), just to give an example. It seems that Dynare 4 does not allow me to do so, even if add the last two lines x remains equal to 1.