Hello Stack community,
I am building the vector autoregression model with three endogenous and one exogenous variables. As I visualize impulse response functions (IRF) using the irf()
function built for VAR package in R, it only plots IRFs with endogenous variables.
However, what I am interested in is the effect of exogenous variable on each endogenous variable, hence I need to plot IRF for exogenous variable.
I would greatly appreciate if someone has an idea how to obtain such plots? Is there a separate package for it? or if not the package, how else shall I deal with it?
I found the package MTS
has what you need:
Install it using library("MTS")
and use the VARXirf()
function:
VARXirf(model,lag=12,orth=TRUE)