I have a problem using conditional_forecast command in Dynare 4.2.1. It seems that the dynare interpreter isn´t creating properly the .m file. To be more specific, the conditioning variable 'r' as setted in the mod file is translated to constrained_vars_ = '46' in the m file, where 46 is exactly the order number of 'r' in the variables declaration. Furthermore, when I put two conditioning variables in mod file, the problem remains for both, but the way those variables are written in m file is quite different.
Have anyone had the same problem?
mike
mod file:
- Code: Select all
conditional_forecast_paths;
var r;
periods 1:4;
values 0.25;
end;
conditional_forecast(parameter_set = posterior_mean, controlled_varexo =(e_R));
m file:
- Code: Select all
constrained_vars_ = [];
constrained_paths_ = zeros(1, 4);
constrained_vars_ = '46';
constrained_paths_(1,1)=0.25;
constrained_paths_(1,2)=0.25;
constrained_paths_(1,3)=0.25;
constrained_paths_(1,4)=0.25;
options_cond_fcst_ = struct();
options_cond_fcst_.parameter_set = 'posterior_mean';
options_cond_fcst_.controlled_varexo=[];
options_cond_fcst_.controlled_varexo = 'e_R';
imcforecast(constrained_paths_, constrained_vars_, options_cond_fcst_);