Page 1 of 1

Looping in deterministic simulation

PostPosted: Mon May 16, 2016 11:53 am
by mricci
Hello,

I am writing to ask how the code Prof. Pfeifer posted here viewtopic.php?f=1&t=4891
for looping over a parameter value in a stochastic simulation, e.g

Code: Select all
rhos = 0.8:0.05:1.05;
first_time = 1;
for i=1:length(rhos)
    if first_time
        set_param_value('rho',rhos(i));
        dynare your_mod_file_here noclearall;
        first_time = 0;
    else
        set_param_value('rho',rhos(i));
        info = stoch_simul(var_list_);
        if info;
          disp(['Computation fails for rho = ' num2str(rho)]);
        end;
    end
end


would change when using a deterministic simulation instead.

Thanks in advance for your time.

Re: Looping in deterministic simulation

PostPosted: Tue May 17, 2016 6:33 pm
by jpfeifer
In this case I would need more info and the files