# NOT RUN {
data <- matrix(rnorm(400), ncol = 4)
x <- bvar(data, lags = 2)
# Add IRFs
x$irf <- irf(x)
# Access IRFs and update confidence bands
irf(x, conf_bands = 0.01)
# Compute and store IRFs with a longer horizon
x$irf <- irf(x, horizon = 24L)
# Lower draws, use `bv_irf()` to set options and add confidence bands
irf(x, bv_irf(24L), n_thin = 10L, conf_bands = c(0.05, 0.16))
# Get a summary of the last saved IRFs
summary(x)
# Limit the summary to responses of variable #2
summary(x, vars_response = 2L)
# }
Run the code above in your browser using DataLab