Loading estimation results

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

Loading estimation results

Postby iacoviel » Thu Mar 20, 2008 3:54 pm

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.

Any suggestions? Thanks
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Postby pburriel » Mon Mar 24, 2008 2:43 pm

Hi Mateo,

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?

Thanks,

Pablo
pburriel
 
Posts: 23
Joined: Wed Jun 29, 2005 4:42 am

Postby iacoviel » Sun Apr 06, 2008 10:08 pm

pburriel wrote:Hi Mateo,

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"



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....)




pburriel wrote: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


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...
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Postby pburriel » Mon Apr 07, 2008 7:19 am

Hi Matteo,

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.

Pablo
pburriel
 
Posts: 23
Joined: Wed Jun 29, 2005 4:42 am

Re: Loading estimation results

Postby JUKI » Fri May 09, 2008 5:57 am

I am experiencing the same problem (see below) with Dynare 4, and wonder if anyone have been able to overcome this by now?



iacoviel wrote: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.

Any suggestions? Thanks
JUKI
 


Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 2 guests