Estimating Responses to Shocks in Germany’s Macroeconomy: Impulse Response Function (IRF)

An impulse response function describes who shocks to a system of equations affects those equations over time.  In economics one might be interested in understanding how a sudden and unexpected change in one variable impact another variable over time.   Following the data and SVAR calculations in the previous post this entry is going to graph impulse response functions and generate tables to illustrate how a one unit change in the log difference in income and investment impacts consumption.


Like in the previous post, calculations were made in the form of a structural vector autoregresssive model using the Cholesky decomposition on consumption, investment, and income on the German macroeconomy.

Impulse response function and other innovations need to be saved in a file before STATA can access that file and generate graphics.  The follow steps clear an existing irf file, replace the an old file with a new file and saves it where the user specifies.   The last two commands are the ones that generate the IRF.  Note that the “oirf” command yield “orthogonal impulse response functions” which in this case correspond to selecting a Cholesky decomposition for the contemporaneous affects matrix.

The blue line above represents the impulse response function and the grey band is the 95% confidence interval for the IRF.  Notice how at about t= 3 (t is in quarter units) the response dies out after having a sharp bound and becomes statistically insignificant.   Just like in the previous post the contemporaneous affect of a 10% in dln_inc is a little more than 4% for consumption.  The affect of an unexpected increase in income would impact consumption immediately and these affects would last about one year.  After the initial increase in consumption, two quarters later you would expect to see another spike in consumption as some of the feedback affects of of the initial shock reverberate throughout the economy especially investment gains.

Why the Rebound in Consumption Two Quarters Later?

The graph above shows that the unexpected increase in income tends to provide a positive jolt to investment about 2 quarters later.  Increased consumption may cause businesses to invest more on technology and infrastructure while households may invest more in residential housing.  The large confidence interval which includes zero indicates that after an unexpected increase in income this increase in investment may or may not materialize. This makes sense as a rational producer would infer that some of the increased sales have been brought about by this windfall income and thus making capital investments may not be a sound course of action since sales may drop off once the extra income is gone. In any event there is weak evidence that some investments will occur with a sudden increase in income about 2 quarters after the windfall.

The increase in investments is shown to increase income in the short run, but the results are not statistically significant.  Much like the second IRF above the increase in investments begin to start returning some income to the economy.  The reaction of investment to consumption leads to the spike in the second quarter in  original IRF where consumption responds to an impulse in income.

The causal interpretations above are possible because of the restrictions placed on the SVAR, which in this case conveniently followed were Cholesky.   In a future post the restrictions on the SVAR will be changed to see how these unexpected changes in the economy dynamically impact each other much like we saw in the description above.

Like in the previous post, calculations were made in the form of a structural vector autoregresssive model using the Cholesky decomposition on consumption, investment, and income on the German macroeconomy.

6 thoughts on “Estimating Responses to Shocks in Germany’s Macroeconomy: Impulse Response Function (IRF)

  1. Hi Mr. Espinoza!
    Your commands work perfectly fine in Stata. I also added a command to generate results in a table:
    irf table irf, noci
    How do you possibly interpret this table? Is there any other command to show results in addition to this table?

    Thank you!

    1. The table represents what you graphically see in the impulse responses. The response of a variable to an exogenous shock of another variable and it’s dynamics over time. So say you have a shock to consumption from an unexpected shock to real interest rates…we’ll after the shock there will be some lingering affects or maybe consumption reacts with a lag to interest rate shocks. Personally, I have always seen the graphs displayed for impulse responses. They usually reserve tables for variance decompositions. Hope this helps.

  2. hi thanks for that i was wondering if you knew how to generate an impulse response response function for a univariate ARIMA model where the dependent variable would be differenced log rgdp? i need the gaphs and the actual estmates of the impulse response-im trying to find out if output fluctuations persist over time?

  3. Thanks for that short but great intro. However, I was wondering how to read the data from the table/graph and store it into the data set. Could you help please with that.

  4. I was wondering if there is a way to store the coefficients from the graph/table into the data set. I couldnt find the matrix where the coeffiients are stored. ANy suggestions?

  5. Is it possible to generate IRFs for nonlinear models like threshold error correction models in Stata using inbuilt commands?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s