rhos = 0.8:0.05:1.05;
first_time = 1;
for i=1:length(rhos)
    if first_time
        set_param_value('rho_a',rhos(i));
        dynare RS_A2.mod noclearall;
        first_time = 0;
    else
        set_param_value('rho_a',rhos(i));
        info = stoch_simul(irf);
        if info;
          disp(['Computation fails for rho = ' num2str(rho_a)]);
        end;
    end
end
