# Plots

**URL:** <https://forum.dynare.org/t/plots/4412>\
**Category:** Dynare help (legacy posts)\
**Created:** [15 January 2015 13:11 UTC](https://forum.dynare.org/t/plots/4412 "2015-01-15T13:11:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [15 January 2015 13:11 UTC](https://forum.dynare.org/t/plots/4412/1 "2015-01-15T13:11:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [17 January 2015 13:30 UTC](https://forum.dynare.org/t/plots/4412/2 "2015-01-17T13:30:55Z")

</div>

1. Looping over parameters per se is discussed in [[Loop over parameters](https://forum.dynare.org/t/loop-over-parameters/3335/1)). 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?](https://forum.dynare.org/t/q-combining-irfs-into-subplotted-figures-iterating/3609/1))

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [17 January 2015 17:00 UTC](https://forum.dynare.org/t/plots/4412/3 "2015-01-17T17:00:07Z")

</div>

The structure oo\_.irfs seems to exist only for stochastic models. Mine is deterministic.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [17 January 2015 17:11 UTC](https://forum.dynare.org/t/plots/4412/4 "2015-01-17T17:11:33Z")

</div>

In that case, the results are stored in

```auto

```

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [17 January 2015 17:22 UTC](https://forum.dynare.org/t/plots/4412/5 "2015-01-17T17:22:28Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [17 January 2015 17:24 UTC](https://forum.dynare.org/t/plots/4412/6 "2015-01-17T17:24:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [22 January 2015 10:45 UTC](https://forum.dynare.org/t/plots/4412/7 "2015-01-22T10:45:28Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [22 January 2015 13:01 UTC](https://forum.dynare.org/t/plots/4412/8 "2015-01-22T13:01:29Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [22 January 2015 13:11 UTC](https://forum.dynare.org/t/plots/4412/9 "2015-01-22T13:11:36Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [22 January 2015 13:22 UTC](https://forum.dynare.org/t/plots/4412/10 "2015-01-22T13:22:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eta](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@eta](https://forum.dynare.org/u/eta)\
**Post date:** [22 January 2015 16:23 UTC](https://forum.dynare.org/t/plots/4412/11 "2015-01-22T16:23:00Z")

</div>

Solved.
