# simple workflow
############################################################
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar_t$new(us_fiscal_lsuw)
set.seed(123)
# estimate the model
posterior = estimate(specification, 10)
# verify autoregression
H0 = matrix(NA, ncol(us_fiscal_lsuw), ncol(us_fiscal_lsuw) + 1)
H0[1,3] = 0 # a hypothesis of no Granger causality from gdp to ttr
sddr = verify_autoregression(posterior, H0)
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_t$new() |>
estimate(S = 10) |>
verify_autoregression(hypothesis = H0) -> sddr
Run the code above in your browser using DataLab