R6 class representing draws from the predictive density of a Bayesian Structural Vector Autoregression model.
An object of class Forecasts.
forecastsAn N x horizon x S numeric array containing draws from the
predictive density.
forecast_meanAn N x horizon x S numeric array containing the conditional
means of the predictive density.
forecast_covarianceAn N x N x horizon x S numeric array containing the conditional
covariance matrices of the predictive density.
YAn N x T numeric matrix containing the data on the dependent
variables used for estimation.
new()Creates a new Forecasts object from the output of the forecasting
procedure.
specify_forecasts$new(output, Y)outputA list containing the forecasting output, including
forecasts, forecast_mean, and forecast_cov.
YAn N x T matrix containing the data on the dependent variables.
An object of class Forecasts.
get_forecasts()Converts the Forecasts object to a list.
specify_forecasts$get_forecasts()A list containing forecasts, forecast_mean,
forecast_covariance, and Y.
clone()The objects of this class are cloneable with this method.
specify_forecasts$clone(deep = FALSE)deepWhether to make a deep clone.
The class contains the following objects:
forecastsAn N x horizon x S array containing draws
from the predictive density.
forecast_meanAn N x horizon x S array containing the
conditional means of the predictive density.
forecast_covarianceAn N x N x horizon x S array
containing the conditional covariance matrices of the predictive density.
YAn N x T matrix containing the data on the dependent
variables used for estimation.
The method as_list() returns the contents of the Forecasts
object as a list.
spec = specify_bsvarSIGN$new(optimism * 100)
post = estimate(spec, 5)
fore = forecast(post, 4)
apply(fore$forecasts, 1:2, mean) # compute mean forecasts
Run the code above in your browser using DataLab