data(us_fiscal_lsuw) # upload data
set.seed(123) # set seed
specification = specify_bsvar_msh$new(us_fiscal_lsuw)# specify model
burn_in = estimate(specification, 10) # run the burn-in
posterior = estimate(burn_in, 20, thin = 1) # estimate the model
# compute regime probabilities
rp = compute_regime_probabilities(posterior)
plot(rp) # plot
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_msh$new() |>
estimate(S = 10) |>
estimate(S = 20, thin = 1) |>
compute_regime_probabilities() |>
plot()
Run the code above in your browser using DataLab