Summary method for bayesianVARs_predict objects
Source:R/utility_functions.R
summary.bayesianVARs_predict.Rd
Summary method for bayesianVARs_predict
objects.
Usage
# S3 method for class 'bayesianVARs_predict'
summary(object, ...)
Arguments
- object
A
bayesianVARs_predict
object obtained viapredict.bayesianVARs_bvar()
.- ...
Currently ignored!
Examples
# 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)
#> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior
#> draws, that do not fulfill the stable criterion.
#>
#> 597 stable posterior draws remaining for prediction!
summary(predictions)
#>
#> Prediction quantiles:
#> , , GDPC1
#>
#> t+1
#> 5% -0.06623
#> 50% -0.02089
#> 95% 0.02220
#>
#> , , CPIAUCSL
#>
#> t+1
#> 5% -0.019613
#> 50% -0.008145
#> 95% 0.003785
#>
#> , , FEDFUNDS
#>
#> t+1
#> 5% -0.022382
#> 50% -0.003965
#> 95% 0.013119
#>