If I may follow up from this post, I am actually doing the same as kipfilet. But I gotta get the impulse response functions from the newly resolved steady state.
Previously, when I executed the “dynare” command, I simply could use oo_.irfs in my m file. But now, I don’t know where the IRFs are stored after I run the command “[dr_,~,M_,~,oo_] = resol(0,M1_,options1_,oo1_);”.
May I know how I can plot the impulse response functions thereafter?
in that case you actually need to loop over
info = stoch_simul(var_list_);
instead of resol. The irfs will then be stored in their usual place.
The parameters I want to loop over will change the steady state. Is there an efficient way to do this? Essentially I need to find a solution to the steady state each time I loop over the values of one parameter?
stoch_simul (and resol) will compute the steady state before computing the decision rules at this point, so you do not need to worry about this.
6 posts were split to a new topic: Loop in perfect foresight context
I am trying to loop over 3 parameters. Say, I want to get the simulated variance of output under different combinations of parameters. Just to illustrate, I used the NK_baseline.mod you wrote. In my code (dynare_loop.m), I looped over the Taylor rule parameters (gammmaR, gammmay, and gammmaPI) then stored the simulated variance in a mat file. For what I want to get, is my code correct? Thank you.
dynare_loop.m (846 Bytes)
NK_baseline_steadystate.m (3.85 KB)
NK_baseline.mod (9.84 KB)
What you do should work, but is extremely inefficient. You should never loop over Dynare, but over the command you need, i.e.
in your case.
2 posts were split to a new topic: SMM loop stuck at initial values
HI, everyone, I wonder if there is now a more convenient way to loop over parameters using dynare 4.5(unstable).
If there is , I am so honored if you let me know.
and I am learning about the code above, and have some questions?
first_time = 1;
dynare your_mod_file_here noclearall;
first_time = 0;
info = stoch_simul(var_list_);
disp('Computation fails for rho = ’ num2str(rho)]);
1, why should “info=1” be judged? so when info=1, the model is wrong?
2, " info = stoch_simul(var_list_);" Since the “var_list_” is sometime empty,how should I do?
Another question is, how could I save results of every loop, using the above code?
Thanks a lot!
I am simulating a very simple RBC model and would like to let the constant tax rate vary. I can do this manually by just resetting the paramter every time I run the code. However, is it possible to perform this automatically? Say, I want the tax rate to increase by 0.1 every time (from 0 to 0.5).
Can I do this in my mod-file or do I have to write a m-file?
Thanks a lot,
What is the command you want to loop over, stoch_simul?
2 posts were split to a new topic: Loop for human capital model
Dear Prof. Jpfeifer,
I am also learning the grid search code now. Based on your posted code, I have two command which I cannot understand.
- you set “first_time = 1”, what do you mean by “first_time”?
- you set “info = stoch_simul(var_list_)”, what do you mean by “info” and “var_list” respectively?
Maybe my questions are very stupid. I am a new learner, could please help me with it?