toTransmissionIrfs
toTransmissionIrfs
toTransmissionIrfs Transform a standard 3D IRF array into a 2D IRF matrix.
irfs = toTransmissionIrfs(irfs) converts an impulse response function (IRF) array of dimensions (n_variables × n_shocks × n_horizons) into a 2D matrix. The first horizon in the input corresponds to horizon 0.
Arguments: - irfs (3D array): An IRF array of size (n_variables × n_shocks × n_horizons), where: - n_variables is the number of variables, - n_shocks is the number of shocks, - n_horizons is the number of forecast horizons.
Returns
irfs(2D matrix): A transformed IRF matrix of size(n_variables * n_horizons) × (n_variables * n_horizons). This is equivalent to computing \((I - B)^{-1}Q\) using the systems form.
Example
Notes
- The first
n_shockscolumn of the returned matrix are simply the standard slices of the IRF 3D-array stacked vertically. The nextn_shockscolumns follow the same principle, but with the firstn_variablescolumns being zero because the shocks are time t shocks which cannot affect time t-1 variables.