This function calculates the impulse response function (IRF) of a time series model. The IRF describes how a model's variables react to external shocks over time.

IRF(x, ...)

Arguments

x

A fitted model object, such as from a VAR or ARIMA model. This model is used to compute the impulse response.

...

Additional arguments to be passed to lower-level functions.

Details

If new_data contains the .impulse column, those values will be treated as impulses for the calculated impulse responses.

The impulse response function provides insight into the dynamic behaviour of a system in response to external shocks. It traces the effect of a one-unit change in the impulse variable on the response variable over a specified number of periods.