diff --git a/matlab/dynare_m.exe b/matlab/dynare_m.exe index 7ecb3d89c46d92f3b351c23aeb6f8e52ef47584b..ba3518c77bec5bb508b9f5703169aa9190c2c489 100755 Binary files a/matlab/dynare_m.exe and b/matlab/dynare_m.exe differ diff --git a/matlab/forecast.m b/matlab/forecast.m index e2a79c00f43bff488c9a4241fcc9ce400b8146e7..df54ad19bf36b93c88f7f68d6f7314df4f7054fa 100644 --- a/matlab/forecast.m +++ b/matlab/forecast.m @@ -130,7 +130,7 @@ function info = forecast(var_list,task) end for i=1:M_.exo_det_nbr - eval(['oo_.forecast.Exogenous.' lgx_det_(i,:) '= M_.exo_det_simul(:,' int2str(i) ');']); + eval(['oo_.forecast.Exogenous.' M_.exo_det_names(i,:) '= oo_.exo_det_simul(:,' int2str(i) ');']); end if options_.nograph == 0 diff --git a/matlab/simultxdet.m b/matlab/simultxdet.m index a7c5a7b2b29fdc98fff5f5b88aa3689fe7f02c1b..9cac9f08b5da30c42b49ba744efc7da701b89eb6 100644 --- a/matlab/simultxdet.m +++ b/matlab/simultxdet.m @@ -108,21 +108,27 @@ function [y_,int_width]=simultexdet(y0,ex,ex_det, iorder,var_list,M_,oo_,options end [A,B] = kalman_transition_matrix(dr,nstatic+(1:npred),1:nc,dr.transition_auxiliary_variables,M_.exo_nbr); - + + inv_order_var = dr.inv_order_var; + ghx1 = dr.ghx(inv_order_var(ivar),:); + ghu1 = dr.ghu(inv_order_var(ivar),:); + sigma_u = B*M_.Sigma_e*B'; + sigma_u1 = ghu1*M_.Sigma_e*ghu1'; sigma_y = 0; for i=1:iter - var_yf(i,dr.order_var) = diag(sigma_y(1:endo_nbr,1:endo_nbr))'; - if i == iter - break - end - sigma_u = A*sigma_u*A'; - sigma_y = sigma_y+sigma_u; + sigma_y1 = ghx1*sigma_y*ghx1'+sigma_u1; + var_yf(i,:) = diag(sigma_y1)'; + if i == iter + break + end + sigma_u = A*sigma_u*A'; + sigma_y = sigma_y+sigma_u; end - fact = qnorm((1-options_.conf_sig)/2,0,1); - + fact = norminv((1-options_.conf_sig)/2,0,1); + int_width = zeros(iter,endo_nbr); for i=1:endo_nbr int_width(:,i) = fact*sqrt(var_yf(:,i)); diff --git a/preprocessor/SymbolTable.cc b/preprocessor/SymbolTable.cc index 849050a29ae070c9297e4dd2157aca87c5ef85f9..bd3190c06d93b415ce14ecbc3a53d415ee1acdd2 100644 --- a/preprocessor/SymbolTable.cc +++ b/preprocessor/SymbolTable.cc @@ -90,12 +90,12 @@ SymbolTable::writeOutput(ostream &output) const } if (exo_det_nbr > 0) { - output << "lgxdet_ = '" << getNameByID(eExogenousDet, 0) << "';" << endl; - output << "lgxdet_tex_ = '" << getTeXNameByID(eExogenousDet, 0) << "';" << endl; + output << "M_.exo_det_names = '" << getNameByID(eExogenousDet, 0) << "';" << endl; + output << "M_.exo_det_names_tex = '" << getTeXNameByID(eExogenousDet, 0) << "';" << endl; for (int id = 1; id < exo_det_nbr; id++) { - output << "lgxdet_ = srtvcat(lgxdet_, '" << getNameByID(eExogenousDet, id) << "');" << endl - << "lgxdet_tex_ = strvcat(lgxdet_tex_, '" << getTeXNameByID(eExogenousDet, id) << "');" << endl; + output << "M_.exo_det_names = srtvcat(M_.exo_det_names, '" << getNameByID(eExogenousDet, id) << "');" << endl + << "M_.exo_det_names_tex = strvcat(M_.exo_det_names_tex, '" << getTeXNameByID(eExogenousDet, id) << "');" << endl; } } if (endo_nbr > 0)