# NOT RUN {
data <- matrix(rnorm(400), ncol = 4)
x <- bvar(data, lags = 2, irf = bv_irf())
# Plot impulse responses for all available variables
plot(irf(x))
# Alternatively
plot(x$irf)
# Subset to impulse variables in positions 2 and 4 via position and name
plot(x$irf, vars_impulse = c(2, 4))
plot(x$irf,
variables = c("solved", "for", "many", "decades"),
vars_impulse = c("for", "decades")
)
# Adjust confidence bands via irf
plot(irf(x, conf_bands = c(0.01, 0.05)))
# }
Run the code above in your browser using DataLab