Hi,
I’ve been trying to replicate Table 3 of Croce (2014) using the code provide by the author, but when I tried to simulate the series with the following code:
per = 840; %number of simulated months
n = 100; %number of simulations
load Approx_10.mat;
shocks = zeros(2,per)./0; % put NaNs everywhere
r = zeros(28,per,n);
for i=1:n
r(:,:,i) = dynare_simul('Approx_10.mat',shocks);
end
I received the error:
Error using dynare_simul_
dynare_simul_ must have at exactly 12 input parameters and 1 output argument.
Error in dynare_simul (line 171)
[err,r]=dynare_simul_(order-1,nstat,npred,nboth,nforw,…
Error in croce2014table3 (line 20)
** r(:,:,i) = dynare_simul(‘Approx_10.mat’,shocks);**
I “solve” the problem editing dynare_simul.m in the following way:
[err,r]=dynare_simul_(order-1,nstat,npred,nboth,nforw,...
nexog,ystart,shocks,vcov_exo,seed,ss,dr);
if err
error('Simulation failed')
for
% call dynare_simul_
[r]=dynare_simul_(order-1,nstat,npred,nboth,nforw,...
nexog,ystart,shocks,vcov_exo,seed,ss,dr);
%if err
% error('Simulation failed')
My questions: is this affecting my results? Are there another way to avoid the problem? Also I’m using dynare 5.0.
Approx_10.mod (4.5 KB)