# impulse

Generate regression model with ARIMA errors impulse response function (IRF)

## Description

returns the impulse response function (IRF)
of the input regression model with ARIMA time series errors.
`y`

= impulse(`Mdl`

)`impulse`

returns the dynamic responses starting at period 0,
during which `impulse`

applies a unit shock to the
innovation.

`impulse(___)`

plots a discrete stem plot of the IRF of
the input regression model with ARIMA errors to the current axes, using any of the input
argument combinations in the previous syntaxes.

`impulse(`

plots on the axes specified by `ax`

,___)`ax`

instead of
the current axes (`gca`

). `ax`

can precede any of the input
argument combinations in the previous syntaxes.* (since R2024a)*

`[___,`

plots the IRF and additionally returns handles to the plotted graphics objects. Use elements of `h`

]
= impulse(___)`h`

to modify properties of the plot after you create it.* (since R2024a)*

## Examples

## Input Arguments

## Output Arguments

## More About

## Tips

To improve performance of the filtering algorithm, specify the number of observations,

`numObs`

, to include in the impulse response.

## Algorithms

If you specify the number of periods

`numObs`

,`impulse`

computes the IRF by filtering a unit shock followed by an appropriate length vector of zeros. The filtering algorithm is very fast and results in an IRF of`numObs`

length.If you do not specify

`numObs`

,`impulse`

implements this procedure:Convert the error model to a pure moving average (MA) polynomial by using the relatively slow lag operator polynomial division algorithm.

Truncate the pure MA polynomial according to default tolerances because the polynomial is generally of infinite degree.

This procedure produces an IRF of generally unknown length. For more details, see

`LagOp`

and`mldivide`

.

## References

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

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

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

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

## Version History

**Introduced in R2013b**