issue:
I need to replicate the dr_.ghx and dr_.ghu files that I obtained from running a .mod that includes estimation and stoch_simul (stoch_simul is executed below estimation). However, when I run the identical .mod file without the estimation part and declare all parameters at the level of their posterior mean, I obtain a different decision rule.
How can I replicate the original ghx and ghu matrices by running stoch_simul?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%1) decision rule obtained from estimated model, saved in results file:
load('RE_original_estimation_results.mat')
dr_.ghx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2) decision rule obtained from setting parameters at posterior_mean estimated
% in "RE_original_estimation.mod":
options_.noprint=1;
dynare RE_model noclearall;
dr_.ghx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%3) decision rule obtained from running stoch_simul with setting parameters
% at posterior_mean through the set_param_value function:
load("parameter_means.mat")
paramvalues = param_means;
paramnames = ["crhoa", "crhob", "crhog",... %feed parameter names in order of declaration in oo_.posterior_mean.parameters
"crhoqs", "crhoms", "crhopinf", "crhow",...
"cmap", "cmaw", "csadjcost", "csigma",...
"chabb", "cprobw", "csigl", "cprobp", "cindw", "cindp","czcap",...
"cfc", "crpi", "crr", "cry", "crdy","constepinf",...
"constebeta", "constelab",'ctrend','cgy', "calfa"];
for k=1:length(paramnames) %declare first set of parameters
set_param_value(paramnames(:,k),paramvalues(k,1));
end
stoch_simul(var_list_); %simulate with these parameters
dr_.ghx
background:
I want to do this because I would like to construct bayesian credible intervals by sampling from the posterior distribution of the parameters. So as a check, I simulated the model with the parameter values at the estimated posterior mean where I expect to obtain the original decision rule and consequently simulate the original time series.
example_folder.zip (806.0 KB)
note: the file credibleinterval_example.m contains the above script and replicates my problem. The code is run in dynare 3.6.4