The function produces different types of impulse responses for the VAR model
$$A_0 y_t = \sum_{i = 1}^{p} A_{i} y_{t-i} + u_t,$$
with \(u_t \sim N(0, \Sigma)\).
Forecast error impulse responses \(\Phi_i\) are obtained by recursions
$$\Phi_i = \sum_{j = 1}^{i} \Phi_{i-j} A_j, i = 1, 2,...,h$$
with \(\Phi_0 = I_K\).
Orthogonalised impulse responses \(\Theta^o_i\) are calculated as \(\Theta^o_i = \Phi_i P\),
where P is the lower triangular Choleski decomposition of \(\Sigma\).
Structural impulse responses \(\Theta^s_i\) are calculated as \(\Theta^s_i = \Phi_i A_0^{-1}\).
(Structural) Generalised impulse responses for variable \(j\), i.e. \(\Theta^g_ji\) are calculated as
\(\Theta^g_{ji} = \sigma_{jj}^{-1/2} \Phi_i A_0^{-1} \Sigma e_j\), where \(\sigma_{jj}\) is the variance
of the \(j^{th}\) diagonal element of \(\Sigma\) and \(e_i\) is a selection vector containing
one in its \(j^{th}\) element and zero otherwise. If the "bvar"
object does not contain draws
of \(A_0\), it is assumed to be an identity matrix.