impulse

Class: arima

Impulse response function

Syntax

impulse(Mdl)
impulse(Mdl,numObs)
Y = impulse(___)

Description

impulse(Mdl) plots a discrete stem plot of the impulse response function for the univariate ARIMA model, Mdl, in the current figure window.

impulse(Mdl,numObs) plots the impulse response function for numObs periods.

Y = impulse(___) returns the impulse response in a column vector for any of the previous input arguments.

Tips

  • To improve performance of the filtering algorithm, specify the number of observations to include in the impulse response, numObs. When you do not specify numObs, impulse computes the impulse response by converting the input model to a truncated, infinite-degree, moving average representation using the relatively slow lag operator polynomial division algorithm. This results in an impulse response of generally unknown length.

Input Arguments

Mdl

ARIMA model, as created by arima or estimate.

numObs

Positive integer indicating the number of observations to include in the impulse response (the number of periods for which impulse computes the impulse response).

When you specify numObs, impulse computes the impulse response by filtering a unit impulse followed by a vector of zeros of appropriate length. The filtering algorithm is very fast and results in an impulse response of known length.

If you do not specify numObs, impulse determines the number of observation using the polynomial division algorithm of the underlying lag operator polynomials, mldivide.

Output Arguments

Y

Column vector of impulse responses. If you specify numObs, then Y is numObs-by-1. If you do not specify numObs, the underlying lag operator polynomial division algorithm returns an impulse response of generally unknown length.

Definitions

Impulse Response Function

The impulse response function for a univariate ARIMA process is the dynamic response of the system to a single impulse, or innovation shock, of unit size. The specific impulse response calculated by impulse is the dynamic multiplier, defined as the partial derivative of the output response with respect to an innovation shock at time zero.

For a univariate ARIMA process, yt, and innovation series εt, the impulse response at time j, Ψj, is given by

ψj=yjε0.

Expressed as a function of time, the sequence of dynamic multipliers, Ψ1, Ψ2,..., measures the sensitivity of the process to a purely transitory change in the innovation process. impulse computes the impulse response function by shocking the system with a unit impulse ε0 = 1, with all past observations of yt and all future shocks of εt set to zero. Because the impulse response function is the partial derivative of the ARIMA process with respect to an innovation shock at time 0, the presence of a constant in the model has no effect on the output.

This impulse response is sometimes called the forecast error impulse response, because the innovations, εt, can be interpreted as the one-step-ahead forecast errors.

Examples

expand all

Plot an Impulse Response Function

Specify the AR(2) model,

$${y_t} = 0.5{y_{t - 1}} - 0.7{y_{t - 2}} + {\varepsilon _t}.$$

Mdl = arima('AR',{0.5,-0.7},'Constant',0)
Mdl = 

    ARIMA(2,0,0) Model:
    --------------------
    Distribution: Name = 'Gaussian'
               P: 2
               D: 0
               Q: 0
        Constant: 0
              AR: {0.5 -0.7} at Lags [1 2]
             SAR: {}
              MA: {}
             SMA: {}
        Variance: NaN

Plot the impulse response function without specifying the number of observations.

impulse(Mdl)

The model is stationary; the impulse response function decays in a sinusoidal pattern.

Store an Impulse Response Function

Specify the ARMA(1,1) model,

$${y_t} = 0.7{y_{t - 1}} + {\varepsilon _t} + 0.2{\varepsilon _{t - 1}}.$$

Mdl = arima('AR',0.7,'MA',0.2,'Constant',0)
Mdl = 

    ARIMA(1,0,1) Model:
    --------------------
    Distribution: Name = 'Gaussian'
               P: 1
               D: 0
               Q: 1
        Constant: 0
              AR: {0.7} at Lags [1]
             SAR: {}
              MA: {0.2} at Lags [1]
             SMA: {}
        Variance: NaN

Store the impulse response function for 15 periods.

Y = impulse(Mdl,15)
Y =

    1.0000
    0.9000
    0.6300
    0.4410
    0.3087
    0.2161
    0.1513
    0.1059
    0.0741
    0.0519
    0.0363
    0.0254
    0.0178
    0.0125
    0.0087

When you specify the number of observations, you know the length of the output impulse response series.

References

[1] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.

[2] Enders, W. Applied Econometric Time Series. Hoboken, NJ: John Wiley & Sons, 1995.

[3] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.

[4] Lütkepohl, H. New Introduction to Multiple Time Series Analayis. New York, NY: Springer-Verlag, 2007.

Was this topic helpful?