Convert bsvarPost tidy outputs to tsibble
Arguments
- object
A
bsvar_post_tbl.- key
Optional key columns. By default,
bsvarPostchooses a key frommodel,variable,shock, anddrawwhen present.- index
Optional index column. By default,
horizonis used if present, otherwisetime.- regular
Optional regularity flag passed to
tsibble::as_tsibble().- validate
Passed to
tsibble::as_tsibble().
Examples
if (FALSE) { # \dontrun{
data(us_fiscal_lsuw, package = "bsvars")
spec <- bsvars::specify_bsvar$new(us_fiscal_lsuw, p = 1)
post <- bsvars::estimate(spec, S = 5, show_progress = FALSE)
irf_tbl <- tidy_irf(post, horizon = 3)
ts_tbl <- as_tsibble_post(irf_tbl)
print(ts_tbl)
} # }