plot.bayesianVARs_bvar {bayesianVARs} | R Documentation |
Plot method for bayesianVARs_bvar
Description
Visualization of in-sample fit. Can also be used to display prediction intervals of future values.
Usage
## S3 method for class 'bayesianVARs_bvar'
plot(
x,
predictions = NULL,
quantiles = c(0.05, 0.5, 0.95),
dates = NULL,
n_col = 1,
...
)
Arguments
x |
An object of class |
predictions |
Optional array of out of sample predictions, e.g. obtained
via |
quantiles |
numeric vector indicating which quantiles to plot. |
dates |
optional vector of dates for labelling the x-axis. The default
values is |
n_col |
integer indicating the number of columns to use for plotting. |
... |
Currently ignored! |
Value
Returns x
invisibly.
See Also
Other plotting plot.bayesianVARs_fitted()
,
plot.bayesianVARs_predict()
, pairs.bayesianVARs_predict()
,
posterior_heatmap()
.
Examples
# Access a subset of the usmacro_growth dataset
data <- usmacro_growth[,c("GDPC1", "CPIAUCSL", "FEDFUNDS")]
# Estimate a model
mod <- bvar(data, sv_keep = "all", quiet = TRUE)
# Simulate from posterior predictive
predictions <- predict(mod, ahead = 1:3)
# Visualize
plot(mod, predictions = predictions)
[Package bayesianVARs version 0.1.3 Index]