Plots

Hi, this is my deterministic model with rigid wages. I compute government purchase impact multipliers on GDP, hours worked and consumption (gmult, hmult, cmult, lines 127-129). I would like to generate the following plots:
1)Using a FOR loop, I should plot the impact multipliers as a function of the wage adjustment parameter, phi_l. The complication is that whenever I change phi_l, I also have to change the size of the discount factor shock and the value of another parameter, theta, in order to achieve a certain target. Any hint ?

2)The second plot requires putting together two models. How can I do this ?

Thanks

  1. Looping over parameters per se is discussed in [Loop over parameters). To take care of parameter dependence of the type you describe, I would recommend using a steady state file. Depending on a value of phi_l, you can set the other parameters in every iteration (see the NK_baseline.mod in the Dynare examples folder. There, the labor disutility parameter is set to achieve labor in steady state to be 0.33)

  2. See [Q: combining IRFs into subplotted figures & iterating?)

The structure oo_.irfs seems to exist only for stochastic models. Mine is deterministic.

In that case, the results are stored in

I’m not sure what you mean by using a steady_state file, but I have to set a shock and values of parameters so as to reproduce some targets on impact. How can I compute impact multipliers if I use values at the steady state ?

In that case, you need a nested internal loop that solves for the endogenous parameters to hit your target.

Hi, I already have subplots for two deterministic models and I’d like to combine them. It’s not clear to me what I have to write after

[code]dynare model1.mod
load(‘model1_results.mat’, ‘oo_’)
transition1=oo_.endo_simul;
save transition1

dynare model2.mod
load(‘model2_results.mat’, ‘oo_’)
transition2=oo_.endo_simul;
save transition2

load transition1
load transition2
figure;
[/code]

I am not sure I understand what you are trying. But you should load the files in functional forms to make sure you do not overwrite the previously loaded ones. Something like

[code]
trans1=load(‘transition1’);
trans2=load(‘transition2’)

figure;
plot(1:length(trans1.oo_.endo_simul(:,1)),trans1.oo_.endo_simul(:,1),‘b-’,1:length(trans2.oo_.endo_simul(:,1)),trans2.oo_.endo_simul(:,1),‘r–’)[/code]

For example, in the posted file, from line 195 you can find subplots. In another model, I have the same subplots, but with different parameters values. What is the procedure to combine them, so that I see two dynamics for each subplot ?

The other model has a different equation, that’s why I can’t do the plots in the same file.

Solved.