I have Dynare version 4.0.4. When I run this command:
stoch_simul(irf=0,order=1,noprint);
forecast(periods=20);
I get an error meassege:
??? Attempted to access ex(21,:); index out of bounds because size(ex)=[20,1].
Error in ==> simultxdet at 73
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...
Error in ==> forecast at 120
[yf,int_width] = simultxdet(y0,ex,oo_.exo_det_simul,...
Error in ==> Aino_170107_TempVat_ExpII at 1527
info = forecast(var_list_,'simul');
Using the second order appr. however works
stoch_simul(irf=0,order=2,noprint);
forecast(periods=20);
In simultxdet funtion its written lin lines 73-74:
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...
ex(i,:)';
should it be written
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu* ...
ex(i-ykmin,:)';
?
After this change, I can take first order appr. and run forecast. The results seems to be ok. Is there some other problem with this change.
Jukka