Learn R Programming

bayesianVARs (version 0.1.6)

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

Description

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

Usage

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

Value

Returns x invisibly.

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!

See Also

Other plotting plot.bayesianVARs_bvar(), plot.bayesianVARs_fitted(), plot.bayesianVARs_predict() posterior_heatmap().

Examples

Run this code
# 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)

Run the code above in your browser using DataLab