pairs_predict | R Documentation |
Pairwise visualization of out-of-sample posterior predictive densities.
## S3 method for class 'bayesianVARs_predict'
pairs(x, vars, ahead, ...)
x |
An object of class |
vars |
Integer vector (or coercible to such) indicating which variables to plot. |
ahead |
Integer vector (or coercible to such) indicating which step
ahead to plot. |
... |
Currently ignored! |
Returns x
invisibly.
Note that that bayesianVARs_predict
can also be used withing plot.bayesianVARs_bvar()
.
Other plotting plot.bayesianVARs_bvar()
,
plot.bayesianVARs_fitted()
, plot.bayesianVARs_predict()
posterior_heatmap()
.
# 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
pairs(predictions, vars = 1:3, ahead = 1:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.