View source: R/utility_functions.R
print.bayesianVARs_predict | R Documentation |
Print method for bayesianVARs_predict objects.
## S3 method for class 'bayesianVARs_predict'
print(x, ...)
x |
A |
... |
Currently ignored! |
Returns x
invisibly.
# Access a subset of the usmacro_growth dataset
data <- usmacro_growth[,c("GDPC1", "CPIAUCSL", "FEDFUNDS")]
# Split data in train and test
train <- data[1:(nrow(data)-4),]
test <- data[-c(1:(nrow(data)-4)),]
# Estimate model using train data only
mod <- bvar(train, quiet = TRUE)
# Simulate from 1-step ahead posterior predictive
predictions <- predict(mod, ahead = 1L)
print(predictions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.