Skip to content
Snippets Groups Projects
Commit dfc89df6 authored by MichelJuillard's avatar MichelJuillard
Browse files

added make_ex_ to fix bug in dyn_forecast and fixed length of output

parent b3ed7901
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,8 @@ global options_ oo_ M_ ...@@ -37,6 +37,8 @@ global options_ oo_ M_
info = 0; info = 0;
make_ex_;
maximum_lag = M_.maximum_lag; maximum_lag = M_.maximum_lag;
endo_names = M_.endo_names; endo_names = M_.endo_names;
...@@ -122,15 +124,15 @@ if ~isscalar(trend) ...@@ -122,15 +124,15 @@ if ~isscalar(trend)
end end
for i=1:n_var for i=1:n_var
eval(['oo_.forecast.Mean.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+1:end)'';']); eval(['oo_.forecast.Mean.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+(1:horizon))'';']);
eval(['oo_.forecast.HPDinf.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+1:end)''-' ... eval(['oo_.forecast.HPDinf.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+(1:horizon))''-' ...
' int_width(:,' int2str(i) ');']); ' int_width(1:horizon,' int2str(i) ');']);
eval(['oo_.forecast.HPDsup.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+1:end)''+' ... eval(['oo_.forecast.HPDsup.' var_list(i,:) '= yf(' int2str(i) ',maximum_lag+(1:horizon))''+' ...
' int_width(:,' int2str(i) ');']); ' int_width(1:horizon,' int2str(i) ');']);
end end
for i=1:M_.exo_det_nbr for i=1:M_.exo_det_nbr
eval(['oo_.forecast.Exogenous.' M_.exo_det_names(i,:) '= oo_.exo_det_simul(:,' int2str(i) ');']); eval(['oo_.forecast.Exogenous.' M_.exo_det_names(i,:) '= oo_.exo_det_simul(maximum_lag+(1:horizon),' int2str(i) ');']);
end end
if options_.nograph == 0 if options_.nograph == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment