Hello,
I am trying to apply estimated DSGE model for counterfactual analysis. the problem that I have encountered is that the code that I have created works with calibrated DSGE model, but not for estimated model.
the code that I am using in matlab for simulating counterfactual is the following:
% save baseline
GDP_GAP_v1=oo_.SmoothedVariables.GDP_GAP;
%%
data=‘oo_.SmoothedShocks.’
shocks1=oo_.SmoothedShocks;
names1=fieldnames(shocks1);
shock_names1=string(names1);
for ii=1:length(shock_names1)
shock_basl(:,ii)=eval([data shock_names1{ii}]);
end
shock_basl
vars=oo_.SmoothedVariables;
var_names1=fieldnames(vars);
var_names1=string(var_names1);
data=‘oo_.SmoothedVariables.’
init= zeros(81,length(var_names1))
for ii=1:length(var_names1)
init(:,ii)=eval([data var_names1{ii}]);
end
init=init(1,:)’
%%
y_pic11=simult_(M_,options_,init, oo_.dr, shock_basl,1);
the error i get is :
y_pic11=simult_(M_,options_,init, oo_.dr, shock_basl,1);
Error using simult_
Too many input arguments.
Error in countfact (line 31)
y_pic11=simult_(M_,options_,init, oo_.dr, shock_basl,1);