Looping in deterministic simulation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Looping in deterministic simulation

Postby mricci » Mon May 16, 2016 11:53 am

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.
mricci
 
Posts: 35
Joined: Sat Aug 16, 2014 3:31 pm

Re: Looping in deterministic simulation

Postby jpfeifer » Tue May 17, 2016 6:33 pm

In this case I would need more info and the files
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests