Combine impulse response functions

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.

Combine impulse response functions

Postby Tartaglia » Tue Dec 08, 2009 9:21 pm

Hi,

is there a command in order to combine impulse response functions from two different calculations, so they are displayed in one diagram (overlapping)?

Thank you
Tartaglia
Tartaglia
 
Posts: 10
Joined: Mon Dec 07, 2009 1:19 am

Re: Combine impulse response functions

Postby AssiaEzzeroug » Wed Dec 09, 2009 10:26 am

Hi,

you can use the "subplot" matlab command to obtain such a result. For that, you'll need to load the simulated series of the variables u r interested in. They are stored in oo_.endo_simul.

Hope this helps
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Combine impulse response functions

Postby Tartaglia » Wed Dec 09, 2009 7:12 pm

I am not very familiar with matlab, but after looking subplot up in the manual it sounded like I had to divide the panes into subpanes, is that necessary. I am not really sure what my command line would look like: subplot

(m,n,p, 'replace')??
Tartaglia
 
Posts: 10
Joined: Mon Dec 07, 2009 1:19 am

Re: Combine impulse response functions

Postby Tartaglia » Wed Dec 09, 2009 11:22 pm

Does it store the results in the same folder where the mod-file is in? Because in that folder I have only found a matlab-figure file called: modelname_IRF_shockedvariable.fig, is this the one?
Tartaglia
 
Posts: 10
Joined: Mon Dec 07, 2009 1:19 am

Re: Combine impulse response functions

Postby AssiaEzzeroug » Thu Dec 10, 2009 10:01 am

Hi,

Your simulations results are stored in oo_ . then go to the matlab command window, and load this mat file like this "load oo_" (first check that the path is correct, means u r in the right repertory). It should appear now in the workspace. You can double-click on it to look at its different fields or just write "oo_" in the command window. Now you should see the field "endo_simul" which is consisted of all the simulated variables series.
For instance you may wanna plot, let's say the variable "Y", then type this: "plot(oo_.endo_simul.Y)".
You have to do the same with your other repertory, and finally use the matlab command "subplot". (Maybe you better rename the mat file oo_ by oo_model1 to avoid potential conflicts).

Hope this helps.
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Combine impulse response functions

Postby Tartaglia » Thu Dec 10, 2009 10:19 am

I am sorry, I could not find any file that contained oo_ . endo_simul in it??? Could it maybe called differently?

In the Dynare Guide it also says that the file is called oo_, but for the life of me I can not find it???
Tartaglia
 
Posts: 10
Joined: Mon Dec 07, 2009 1:19 am

Re: Combine impulse response functions

Postby pakocica » Thu Dec 10, 2009 11:34 am

Tartaglia,
try to load the file filename_results.mat.

Good luck!
Pavel
pakocica
 
Posts: 46
Joined: Fri Nov 27, 2009 6:42 pm
Location: Taiwan (come from Prague)

Re: Combine impulse response functions

Postby AssiaEzzeroug » Thu Dec 10, 2009 11:47 am

Sorry I forgot to precise that oo_ is stored indeed in the mat file "filename_results.mat".

Best
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Combine impulse response functions

Postby Tartaglia » Thu Dec 10, 2009 2:13 pm

Ohhhh yeah, now it did work, thanks so much. I'll try the plotting now!!

Thank you so much for your help.

Tartaglia
Tartaglia
 
Posts: 10
Joined: Mon Dec 07, 2009 1:19 am

Re: Combine impulse response functions

Postby ericlearndynare » Fri Jun 22, 2012 1:43 pm

Hi everybody!

Maybe it's a silly question, I have done the simulation, but don't know how to load specific simulated variable.
After "load trial_results.mat" and "load oo_.endo_simul", it's a big matrix presented in the workspace, i want to abstract one by one, le't say the variable "y", what should i do?

eric
ericlearndynare
 
Posts: 6
Joined: Tue Mar 30, 2010 1:31 pm

Re: Combine impulse response functions

Postby jpfeifer » Fri Jun 22, 2012 3:16 pm

After running the simulations, there should be a bunch of variables named after the simulated variables in the workspace, containing the simulated values (with dimensions replic times periods)
------------
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 5 guests

cron