Page 1 of 1

A bug or not a bug? conditional_forecast

PostPosted: Mon Aug 22, 2011 9:44 am
by olayenidynare
The following excerpt from imcforecast.m seems to be causing a crash with conditional_forecast:

for i = 1:n1
idx = [idx ; oo_.dr.inv_order_var(strmatch(deblank(constrained_vars(i,:)),M_.endo_names,'exact'))];
jdx = [jdx ; strmatch(deblank(options_cond_fcst.controlled_varexo(i,:)),M_.exo_names,'exact')];
end
mv = zeros(n1,NumberOfStates);
mu = zeros(ExoSize,n2);
for i=1:n1
mv(i,idx(i)) = 1;
mu(jdx(i),i) = 1;
end


I think the problem is with
idx = [idx ; oo_.dr.inv_order_var(strmatch(deblank(constrained_vars(i,:)),M_.endo_names,'exact'))];

I bypass this problem by directly inserting the constrained_vars somewhere and it works. Also there seems to be a problem with plot_icforecast.m
What I did was to save the output before calling this function, but it's not convenient.

Can one carry out k-step ahead analysis here too and how?
Thank you
Olayeni