# Load the package
library(bsvars)
# Load the data
data(us_fiscal_lsuw)
# Specify the model
specification <- specify_bsvar_sv$new(us_fiscal_lsuw, p = 1)
# Run the burn-in
burn_in <- estimate(specification, 5)
# Estimate the model posterior
posterior <- estimate(burn_in, 10)
# Compute impulse responses 2 years ahead
irf <- compute_impulse_responses(posterior, horizon = 8)
# Compute forecast error variance decomposition 2 years ahead
fevd <- compute_variance_decompositions(posterior, horizon = 8)