Parameter loop in Dynare 5.x

For Dynare 5, you forgot to output the results from stoch_simul:


clear all;

OMEGARS = 1:1:5;
first_time = 1;

for i = 1:length(OMEGARS)
    if first_time           
        dynare rentalhousing noclearall;
        first_time = 0;
    else                 
        set_param_value('OMEGAR',OMEGARS(i));        
        [info, oo_] = stoch_simul(M_, options_, oo_, var_list_);
        if info
          disp(['Computation fails for rho = ' num2str(OMEGARS)]);
        else
        %results_cell{i} = oo_ ;
        plot(oo_.irfs.data_QQ_eps_j);
        hold on;
        disp('I am plotting');
        oo_.irfs.data_QQ_eps_j
        end
    end 
        
 end

3 Likes