Wednesday, November 2, 2011

Impulse Response Functions From VECMs

In the comments and discussion associated with an earlier post on "Testing for Granger Causality" an interesting question arose. If we're using a VAR model for constructing Impulse Response Functions, then typically we'll want to compute and display confidence bands to go with the IRFs, because the latter are  simply "point predictions". The theory for this is really easy, and in the case of EViews it's just a trivial selection to get asymptotically valid confidence bands.

But what about IRFs from a VECM - how do we get confidence bands in this case? This is not nearly so simple, because of the presence of the error-correction term(s) in the model. EViews doesn't supply confidence bands with the IRFs in the case of VECMs. What alternatives do we have?

In responding to a question from "Nick from the Netherlands" I drew attention to the paper by Benwitz et al. (2001), and I also mentioned Helmut Lütkepohl's free software, JMulTi. I'd not played with the latter previously, and when I read the "manual" I erroneously came to the conclusion that it provides confidence bands for IRFs only in the VAR case.

Not so! [Hat-Tip to "Paul" for drawing my attention to this.]
In fact, you can easily compute and plot bootstrapped confidence bands for IRFs generated by a VECM using JMulTi. Here's how.
  • Downloading and installing the free JMulTi software takes just a couple of minutes.
  • Fire up JMulTi :
(You won't see any data series names listed in the right panel)
  • Select "File" / "Import Data", and choose a data-set:



  • Select "Initial Analysis" and choose the series you want to analyze - the tabs are self-explanatory.

  • Moving from the "Workbench" you can go through your tests for unit roots and your cointegration testing:

  • I'm going to skip the rest of the basic testing and assume that we have found cointegration and we're ready to estimate a VECM. This is how we specify the model:




  • Here's what we see when we select the "Estimate" tab:


  • Now we select the "Structural Analysis" tab, then the "Specify IRA" tab, and choose our bootstrapped confidence intervals for the IRFs:



  • After selecting the "Bootstrap Confidence Intervals" button (bottom right), we select the "Display Impulse Responses" tab, and select and highlight which IRFs we want. I've chosen to look at the response of P to a shock in GNP:



  • The "Configure Plot" button enable us to "pretty up" the graphs that follow, and then we choose the "Display IR" button. We get the following numerical results (including the desired confidence intervals):



  • And here's the corresponding plot (after I selected "View" / "Options" and got rid of the black background):



So, there we have it! The Blanchard-Quah data-set used in this illustration is provided with the JMulTi software, but I've also put it on the Data page that goes with this blog, in a .DAT file. Keep in  mind that getting the confidence interval for an IRF from a VAR model is no problem - here we were dealing with the case of a VECM.

Thanks again "Paul"!

Note: The link to the following reference will be helpful only if your computer's IP address gives you access to the electronic version of the publication in question. That's why a written References section is provided.

Reference

Benkwitz, A., H. Lütkepohl and J. Wolters (2001). Comparison of bootstrap confidence intervals for impulse responses of German monetary systems.  Macroeconomic Dynamics, 5, 81-100.


© 2011, David E. Giles

32 comments:

  1. David,

    This is also very easy to do in gretl (gretl.sourceforge.net). Gretl is free too, and among other things can be linked to R or Ox.

    PS

    ReplyDelete
  2. psummers: Thanks! Yes, I've posted about Gretl before - free is always good!

    ReplyDelete
  3. Yuck, -0.0 should never be a valid axis label!

    ReplyDelete
  4. Ben: Good eye! And I agree - not my choice!

    ReplyDelete
  5. In IRF of VAR if the model is log(y) = dlog(x)dlog(z), where y is I(0), the interpretation of 1 s.d. cholesky (dof adjusted) in EViews is "a 1% increase in x, will result to % increase in y".

    Is this how you convert 1 s.d. shock to interpret the result in a reader friendly manner? I presumed that the IRF in VECM can be interpreted in the same way?

    ReplyDelete
  6. Using Eview, select estimate / unrestricted VAR and increase VECM optimal lag by 1. / ok. on this VAR estimates, select view/impulse response/ok.

    How correct is this for VECM IRFs analysis.

    Ola

    ReplyDelete
  7. Anonymous 2: That's hard to say, out of context.

    ReplyDelete
  8. dear prof Giles...
    how are you?..
    i have done my project on impulse response function from VAR...but i have problem to interpret the graph..can you help me the way to understand that graph...

    thank you very much,,,your help is very hoped

    ReplyDelete
    Replies
    1. Why not check out http://espin086.wordpress.com/2011/04/02/the-impact-of-unexpected-shocks-to-the-u-s-economy-impulse-response-functions-revisitedirf/

      Delete
    2. from http://espin086.wordpress.com/2011/04/02/the-impact-of-unexpected-shocks-to-the-u-s-economy-impulse-response-functions-revisitedirf/

      "A one standard deviation shock to the inflation rate increases the unemployment rate, the effect becomes statistically significant 7 quarters after the shock, and unemployment returns decreases to its previous value about 24 years later or 6 years." but i hope professor can explain how to read the values ​​on the vertical axis. is A one standard deviation shock to the inflation rate increases 20% the unemployment rate after 15 quarters or 0.2 point (or 0.2 standard deviation) the unemployment rate after 15 quarters. Thank you very much

      Delete
  9. Dear Professor,
    I would be grateful if you could help me with IRF of VAR in eviews. I am working with a 4 variable (in DLOG) VAR and I need to see the effects of a 1% Cholesky shock, but Eviews provides only the one s.d. Cholesky shock option. How can I manage to obtain the 1% shock IRF?

    Thank you very much for your kind reply and thank you for your really interesting blog.

    Best Regards

    ReplyDelete
  10. Thanks for your post. I would like to know how I can understand whether the impulse responses are statistically significant. Eviews is reporting -/+ 2 SE bands. If the impulse response is within this band then we conclude that are significant ? But usually the Bands are getting wider and wider, so makes little sense to me that whatever is within the red lines (Bands) is fine. Thanks.

    ReplyDelete
    Replies
    1. The IRF's have to lie within the confidence bands - by construction. It;s analogous to a confidence interval in estimation. Yes, they typically get wider, just as any forecast interval will. If the lower limit of the band falls below zero, then at that point the response is not significantly different from zero (at the 95% confidence level), etc.

      Delete
  11. Dear Professor,

    I have a question related to VECM and VAR. I run a Johansen cointegration test for three model spacifications (restricted constant, constant and restricted trend) in Stata and applied the Pantula principle.

    I have found no cointegration in the models with constand and rtrend, but have found two relationships in the rconstant model. However, the subsequent VECM has only 3 significant alphas out of six for both cointegrating equations (CE) and all Betas appear very insignificant at 5% level.

    My question is: Should I persist with this VECM model? Or is it justifiable to conclude that there exist no cointegrating equations and proceed to run a VAR instead?

    ReplyDelete
    Replies
    1. These sorts of results are always a challenge! 5 questions - how many variables are in your model; what is the frequency of your data; what is your sample size; are there any structural breaks in the data; have you tested for normality of the errors (and if normality is rejected, is it because of asymmetry or because of excess kurtosis)?????

      Delete
  12. Is impulse response performed on I(0)
    variables or I(1) variables?

    kvbm

    ReplyDelete
  13. Dear Professor Giles, how would one interpret the impulse response functions if one had all variables in log differences (\Delta Ln (y_t))?

    ReplyDelete
    Replies
    1. JJ - then everything is in terms of percentage changes,

      Delete
    2. Thank you for the swift response. To clarify, is it this: "a one percent change in the rate of growth of the first variable produces `x%' change in the rate of growth of the second variable", or this: "a one percent change in the first variable produces `x%' change in the second variable"?

      Delete
    3. Thank you, professor. You are 100% awesome!

      Delete
  14. Dear Prof Giles,

    when the variables are expressed as logs they can be interpreted as percentage changes. Does this interpretation change if the time series are not I(0) and rather I(1). Thank you in advance for your answer!

    ReplyDelete
  15. Dear Prof Giles,

    The IRF from VAR models are mean-reverting or converged to zero after some periods following an initial shock. But usually IRF from VECM doesn't follow this behavior, why? your answer will be much appreciated.

    ReplyDelete
    Replies
    1. That will be because the lag structure of your model is dynamically unstable - that is, one or more of the inverse roots of the characteristic equation lie outside the unit circle. Such a model shouldn't be used.

      Delete
  16. Dear Professor,

    You have mentioned in previous comments that " If the lower limit of the band falls below zero, then at that point the response is not significantly different from zero (at the 95% confidence level)". How do we interpret the significance of the IRF when both the lower and upper band are below zero and they stay that way in the whole graph?

    ReplyDelete
    Replies
    1. Then the response IS significantly different from zero, everywhere (at the 5% level).

      Delete
  17. Dear Dave

    What about transforming the VECM into its (restricted) VAR form, and generating the IRF using the traditional IRF routine based on VAR? Isn't that the standard way to generate IRF for VECM?

    Thanks!

    ReplyDelete

Note: Only a member of this blog may post a comment.