Plotting IR before and after the shock in a unique figure

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.

Plotting IR before and after the shock in a unique figure

Postby Calo89 » Sat Oct 05, 2013 5:42 pm

Hi everyone,

Normally I plot my Impulse Responses and what I observe is just the path followed by the variables immediately after the shock. But how can I manage to plot the path of the variables even when the shock is not yet occured, so that I have a unique figure in which there is not only the path followed by the variables after the shock but also their path immediately before that shock.
Thanks in advance!

Andrew
Calo89
 
Posts: 3
Joined: Mon Aug 26, 2013 8:25 am

Re: Plotting IR before and after the shock in a unique figur

Postby AS90 » Sat Oct 05, 2013 6:41 pm

IRFs analysis is executed so as to observe hypothetical business cycle conducts: deviations from the economy's steady state; anything before that is hardly germane. Such IRFs are but MA(inf) coefficients pursuant to the AR(1) initial process, provided causality conditions be met by it, plotted against time:

Code: Select all
y(t)=Ay(t-1)+e(t) - AR(1) (invertible)
y(t)-Ay(t-1)=e(t)
(I-AL)y(t)=e(t)
A(L)y(t)=e(t) - check for causality

min|z(i)|>1 for |I-Az|=0

y(t)=inv[A(L)]e(t)
y(t)=∑Aˆ(j)e(t-j) {with j=0 to inf for ∑, since inv[A(L)]=∑Aˆ(j)Lˆ(j)}
y(t)=Aˆ(0)e(t)+Aˆ(1)e(t-1)+Aˆ(2)e(t-2)+... - MA(inf) (causal)


.
AS90
 
Posts: 39
Joined: Tue Jul 23, 2013 3:22 pm

Re: Plotting IR before and after the shock in a unique figur

Postby jpfeifer » Sun Oct 06, 2013 4:59 pm

The assumption when generating IRFs at order 1 is that the system was in steady state before the shock generating the IRFs hit. All IRFs are plotted relative to the steady state. Thus, the IRFs are simply 0 before the plotted periods. At higher order the issue is more involved as we are talking about Generalized IRFs.
------------
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: Plotting IR before and after the shock in a unique figur

Postby Calo89 » Sun Oct 06, 2013 5:15 pm

Guys thank you for reply. Actually I know all these things you wrote, I just wondering the way I can plot that situation I described!
Calo89
 
Posts: 3
Joined: Mon Aug 26, 2013 8:25 am

Re: Plotting IR before and after the shock in a unique figur

Postby jpfeifer » Sun Oct 06, 2013 6:06 pm

Then where is the problem? If you have a shock e and a variable y, you could just use
Code: Select all
 plot([-5:options_.irf],[zeros(6,1); y_e])

to plot the 6 periods of 0 preceeding the IRF for y in response to e.
------------
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 7 guests