Recursively computes IRFs given an impact matrix and VAR coefficient array. Optionally cumulates responses for selected variables.
Arguments
- Psi
Impact matrix, dimension
N x R.- Phi
Array of VAR coefficient matrices, dimension
N x N x P.- H
Horizon (number of periods) for which to compute IRFs.
- cum
Logical scalar or logical vector of length
N. IfTRUEfor variablei, the IRF is cumulated viacumsum. A single value is applied to all variables.