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