Plots

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.

Plots

Postby eta » Thu Jan 15, 2015 1:11 pm

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
Last edited by eta on Wed Jan 27, 2016 11:04 am, edited 1 time in total.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby jpfeifer » Sat Jan 17, 2015 1:30 pm

1. Looping over parameters per se is discussed in http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891. 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 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5259
------------
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

Re: Plots

Postby eta » Sat Jan 17, 2015 5:00 pm

The structure oo_.irfs seems to exist only for stochastic models. Mine is deterministic.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby jpfeifer » Sat Jan 17, 2015 5:11 pm

In that case, the results are stored in
Code: Select all
oo_.endo_simul
------------
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

Re: Plots

Postby eta » Sat Jan 17, 2015 5:22 pm

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 ?
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby jpfeifer » Sat Jan 17, 2015 5:24 pm

In that case, you need a nested internal loop that solves for the endogenous parameters to hit your target.
------------
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

Re: Plots

Postby eta » Thu Jan 22, 2015 10:45 am

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: Select all
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;
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby jpfeifer » Thu Jan 22, 2015 1:01 pm

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: Select all
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--')
------------
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

Re: Plots

Postby eta » Thu Jan 22, 2015 1:11 pm

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 ?
Last edited by eta on Wed Jan 27, 2016 11:04 am, edited 1 time in total.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby eta » Thu Jan 22, 2015 1:22 pm

The other model has a different equation, that's why I can't do the plots in the same file.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Plots

Postby eta » Thu Jan 22, 2015 4:23 pm

Solved.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests