Merge branch 'cond_forecast' into 'master'

imcforecast.m: make sure that draw index for CIs stays within feasible bounds

See merge request Dynare/dynare!1706
time-shift
Sébastien Villemot 2020-02-06 09:19:40 +00:00
commit f5c4cd5372
1 changed files with 2 additions and 2 deletions

View File

@ -257,8 +257,8 @@ mFORCS1 = mean(FORCS1,3);
mFORCS1_shocks = mean(FORCS1_shocks,3);
tt = (1-options_cond_fcst.conditional_forecast.conf_sig)/2;
t1 = round(options_cond_fcst.replic*tt);
t2 = round(options_cond_fcst.replic*(1-tt));
t1 = max(1,round(options_cond_fcst.replic*tt));
t2 = min(options_cond_fcst.replic,round(options_cond_fcst.replic*(1-tt)));
forecasts.controlled_variables = constrained_vars;
forecasts.instruments = options_cond_fcst.controlled_varexo;