augment.bvar {BVARverse} | R Documentation |
Turn the outputs of a Bayesian VAR (see bvar
) into a
an augmented tibble. Methods are available for bvar
objects (will
yield coefficients and their quantiles), bvar_fcast
objects (with
predictions, their quantiles and optionally real datapoints), and
bvar_irf
objects (with impulse responses).
## S3 method for class 'bvar' augment(x, conf_bands = 0.16, ...) ## S3 method for class 'bvar_fcast' augment(x, t_back = 0L, ...) ## S3 method for class 'bvar_irf' augment(x, ...)
x |
A |
conf_bands |
Numeric vector. Credible intervals of coefficients to include in the tibble. |
... |
Not used. |
t_back |
Integer scalar. Whether to include actual datapoints in the tidied forecast. |
Returns a tibble
with relevant information;
quantiles can be found in the columns.
# Access a subset of the fred_qd dataset data <- fred_qd[, c("CPIAUCSL", "UNRATE", "FEDFUNDS")] # Transform it to be stationary data <- fred_transform(data, codes = c(5, 5, 1), lag = 4) # Estimate a BVAR using one lag, default settings and very few draws x <- bvar(data, lags = 1, n_draw = 1000L, n_burn = 200L, verbose = FALSE) # Create tibbles from the outputs augment(x) augment(irf(x)) augment(predict(x))