Finding impulse response function based on Dynare output

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.

Finding impulse response function based on Dynare output

Postby chadhoward » Sun May 09, 2010 8:03 pm

1. How can I find the form of the impulse response function that created the impulse response graphs based on my .mod file?

2. Am I right in thinking that the impulse response function uses the figures in the Policy and Transition Functions table as inputs?

Thanks so much. The folks on this forum have been fantastic.
Attachments
ireland_9May2101.mod
(10.49 KiB) Downloaded 257 times
chadhoward
 
Posts: 6
Joined: Sat May 08, 2010 12:37 pm

Re: Finding impulse response function based on Dynare output

Postby jpfeifer » Mon May 10, 2010 6:43 am

1. What do you mean with "the form"? The numbers of the IRFs are stored in the results structure oo_.irfs that is in the workspace after running the code.
2. Yes, the IRFs come from the computed model solution. The respective matrices are stored in oo_.dr. For more information see the manual http://www.dynare.org/documentation-and-support/manual/manual.pdf/view pages 30-31.
------------
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: Finding impulse response function based on Dynare output

Postby chadhoward » Mon May 10, 2010 7:08 am

1. What do you mean with "the form"? The numbers of the IRFs are stored in the results structure oo_.irfs that is in the workspace after running the code.


If I had to write down the equation that describes the impulse responses, how could I do that? Presumably, the figures in oo_.irfs are plugged into the impulse response function to create the graphs of the function.
chadhoward
 
Posts: 6
Joined: Sat May 08, 2010 12:37 pm

Re: Finding impulse response function based on Dynare output

Postby jpfeifer » Mon May 10, 2010 8:14 am

No, the figures in oo_.irfs are actually the already computed IRFs. You are looking for the state space representation. If you look into the manual on page 30 you see for the first order approximation the formula
Code: Select all
y_t=ys+A*yh_t-1 + B*u

where ys is the steady state. Subtracting ys from both sides you get
Code: Select all
y_t-ys=A*yh_t-1 + B*u

where y_t-ys is the deviation from steady at t=1 and yh_t-1 is the deviation from steady state at t-1. For impulse responses, at t=0 everything is in steady state, so y_0-ys=yh_-1=u=0. Then you shock the system at t=1 by shocking an element of u, afterwards, for all t>1 u is again the zero vector. By recursively computing the above formula, you get the deviations from steady state following the shock for all times. Nothing else than the values of this equation is stored in oo_.irfs.
The formula also is valid for the endogenous variables' IRFs as it contains the policy funtion (the decision rule to choose the endogenous variables as a function of the shocks and states).
So all you need to report are the matrices A and B. You can find in the manual how they are stored in Dynare.
------------
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: Finding impulse response function based on Dynare output

Postby chadhoward » Mon May 10, 2010 2:02 pm

I've read a lot about this oo_.irfs file, but can't seem to find it anywhere. The manual doesn't appear to give any clues. What does it look like? How do I retrieve it?
chadhoward
 
Posts: 6
Joined: Sat May 08, 2010 12:37 pm

Re: Finding impulse response function based on Dynare output

Postby jpfeifer » Mon May 10, 2010 2:38 pm

Actually, this is not a file, but a structure, i.e. a variable, that you can find in the Matlab-workspace (the memory if you will) after you ran your Dynare code.
------------
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: Finding impulse response function based on Dynare output

Postby Newbie » Thu Nov 15, 2012 6:51 pm

Hello jpfeifer,

maybe you could also give me a hand here, since I am new to the whole topic.
When I run the attached simple RBC model I get the following policy functions:

POLICY AND TRANSITION FUNCTIONS
c k z
Constant 2.754310 37.987290 1.000000
k(-1) 0.044827 0.965275 0
z(-1) 1.355140 2.311810 0.990000
e 1.368828 2.335162 1.000000

so I go by the assumption that z(t) = z_steady +[z(t-1) - z_steady]*0.99 + 1*e.
How is the impulse response function calculated? Is it calculated with the above formula?
If we consider z_steady = z(0) = 1 and the schock e=0.007 like it is in the model then we get:
z(1) = 1 + 0.007 = 1.007
z(2) = 1 + 0.007*0.99 = 1.0069
etc.

but the values in oo_.irfs.z_e are:
0.0837
0.0828
0.0820

How are these values calculated?
Thank you in advance for your reply!
Attachments
Test_Model.mod
(642 Bytes) Downloaded 174 times
Newbie
 
Posts: 6
Joined: Sun Nov 11, 2012 2:53 pm

Re: Finding impulse response function based on Dynare output

Postby jpfeifer » Fri Nov 16, 2012 9:45 am

Dynare uses a one-standard deviation shock, which is sqrt(0.007)=0.0837. After that, the IRF decays at rate 0.9.
------------
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: Finding impulse response function based on Dynare output

Postby vero_acurio » Fri Feb 15, 2013 12:56 pm

Hello,

I have a question. In Dynare, the matrix A has as rows all the endogenous variables and as columns the state variables.

What happend when the number of state variables (m) is smaller than the number of endogenous variables (n) ?

How can we do the operation Ay^h_t if the matrix size are not agree (A is (nxm) and y^h_t is (nx1))? How the remaining part of the matrix A is fill up?

Thanks for your answer.

Best Regards,

Veronica
vero_acurio
 
Posts: 15
Joined: Thu Jun 25, 2009 7:40 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests