Skip to contents

Pairwise visualization of out-of-sample posterior predictive densities.

Usage

# S3 method for class 'bayesianVARs_predict'
pairs(x, vars, ahead, ...)

Arguments

x

An object of class bayesianVARs_predict obtained via predict.bayesianVARs_bvar().

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. max(ahead) must be smaller equal to dim(x$predictions)[1].

...

Currently ignored!

Value

Returns x invisibly.

Note

Note that that bayesianVARs_predict can also be used withing plot.bayesianVARs_bvar().

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)
#> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior
#>           draws, that do not fulfill the stable criterion.
#> 
#>  485 stable posterior draws remaining for prediction!

# Visualize
pairs(predictions, vars = 1:3, ahead = 1:3)