How to load posterior mean?

Dear All,

How can I load the posterior mean and perform forecast after estimation is already done?

Thank you.

First of all you need to enough Metropolis replications (option mh_replic) to get a good description of the posterior distribution. It is not possible to obtain posterior mean after computing only the posterior mode.

If you run Metropolis replications as part of the estimation statement (or use load_mh_file), the parameter values used in a subsequent stoch_simul or forecast will be at the posterior mean



Dear all,

I’m trying to load the posterior values for the estimated parameters and shock std in another .mod session where I’m going to use the stochastic simulation only. For that purpose, I wrote the following before the stoch_simul block:

load baseline189_oo_.mat; mypars=baseline189_oo_.posterior_mean.parameters; myshocks=baseline189_oo_.posterior_mean.shocks_std; xid = mypars.xid; shocks; var muz_eps = myshocks.muz_eps ^2 ; end;

But Dynare spits an error: syntax error, unexpected ‘.’ at the first instance of `mypars.xid '.

Attached mod-file.

baseline192.mod (59.2 KB)

Try using 4.4 and put those statements into the new verbatim-block.

It is working with loading the parameters, but verbatim-block seems to be conflicting with the shocks-block - either put inside or outside the shocks-block.
Any workaround to load shock std?

An inelegant solution to load shock std:


var muz_eps = myshocksmat(1) ^2 ;
var epsilon_eps = myshocksmat(2) ^2 ;
% etc.

Given the current preprocessor, that is the only way to do it.