Compute Impulse Response for Every Sample of MCMC
irf_single(i, varrlt, Lamb, Ynum, type = "orth", impvar = 1, nhor)
i
: the th sample in MCMCvarrlt
: estimation results for VAR equations, and it's got by BayesVAR
.Lamb
: a array with 3 dimension. and Lamb[i,,]
is factor loading matrix for factor equations.Ynum
: the ncol(Y)
.type
: 'orth'
is orthogonal IRF, and 'gen'
is generalized IRF.impvar
: a numeric scalar which is position of variables in VAR equation. If it's NULL
that is default, its position is the last.nhor
: IRF horizon, default is NULL
IRF matrix, the dimension is ncol(Xmatrix) + ncol(Y)
xnhor
.
Useful links