R6 class representing draws from the predictive density of a Bayesian Structural Vector Autoregression model.
Details
The class contains the following objects:
forecastsAn
N x horizon x Sarray containing draws from the predictive density.forecast_meanAn
N x horizon x Sarray containing the conditional means of the predictive density.forecast_covarianceAn
N x N x horizon x Sarray containing the conditional covariance matrices of the predictive density.YAn
N x Tmatrix containing the data on the dependent variables used for estimation.
The method as_list() returns the contents of the Forecasts
object as a list.
Public fields
forecastsAn
N x horizon x Snumeric array containing draws from the predictive density.forecast_meanAn
N x horizon x Snumeric array containing the conditional means of the predictive density.forecast_covarianceAn
N x N x horizon x Snumeric array containing the conditional covariance matrices of the predictive density.YAn
N x Tnumeric matrix containing the data on the dependent variables used for estimation.
Methods
Method new()
Creates a new Forecasts object from the output of the forecasting
procedure.
Usage
specify_forecasts$new(output, Y)Examples
spec = specify_bsvarSIGN$new(optimism * 100)
post = estimate(spec, 5)
#> **************************************************|
#> bsvarSIGNs: Bayesian Structural VAR with sign, |
#> zero and narrative restrictions |
#> **************************************************|
#> Progress of simulation for 5 independent draws
#> Press Esc to interrupt the computations
#> **************************************************|
fore = forecast(post, 4)
apply(fore$forecasts, 1:2, mean) # compute mean forecasts
#> [,1] [,2] [,3] [,4]
#> [1,] 84.5451248 85.1549035 84.8759131 8.445742e+01
#> [2,] -1070.4948614 -1069.6004138 -1070.8006405 -1.069942e+03
#> [3,] -338.6833530 -338.5817412 -338.7693864 -3.387349e+02
#> [4,] 0.5422752 0.5167357 0.1908743 1.367001e-02
#> [5,] -784.2297911 -784.9333610 -785.2907366 -7.851993e+02
