by sanga » Wed Apr 01, 2015 10:32 pm
Dear Johannes,
I am trying to find moments and IRF of some variables when 2 and 3 policy parametrs change. I made the following loops in separate matlab-files, which run, but I need help in order to save and extract moments and IRF when the loop is over 2 or 3 parameters.
betha1s= 1.5:0.1:1.9;
for i=1:length(betha1s)
betha2s=0.5:0.1:0.6;
for j=1:length(betha2s)
set_param_value('betha1',betha1s(i));
set_param_value('betha2',betha2s(j));
dynare pays_111_sP noclearall;
moments(:,i)=diag(oo_.var);
end
save(['results_',num2str(j)])
end
Questions: 1) This code runs, but not able to give me the moment change over parameter values (here, 10 variances). I get only 2 or 5 variances instead of 10. How to do that?
2) How can I save and call IRFs for some variables using the 2 loops?