rhos = 0.3:0.3:0.9;
first_time = 1;
for i=1:length(rhos)
    if first_time
        set_param_value('rho',rhos(i));
        dynare test noclearall;
        first_time = 0;
    else
        set_param_value('rho',rhos(i));
        %info = stoch_simul(var_list_); %this is known to work.
        %THE FOLLOWING COMMAND DOES NOT WORK, BUT IS WHAT I AM LOOKING FOR:
        info = estimation(datafile=data_estimation) pi, y, i;
        if info
          disp(['Computation fails for rho = ' num2str(rho)]);
        end
    end
end