| specify_forecasts | R Documentation |
R6 class representing draws from the predictive density of a Bayesian Structural Vector Autoregression model.
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.
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.
Forecasts$new()Creates a new Forecasts object from the output of the forecasting
procedure.
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.
Forecasts$get_forecasts()Converts the Forecasts object to a list.
Forecasts$get_forecasts()
A list containing forecasts, forecast_mean,
forecast_covariance, and Y.
Forecasts$clone()The objects of this class are cloneable with this method.
Forecasts$clone(deep = FALSE)
deepWhether to make a deep clone.
spec = specify_bsvar$new(us_fiscal_lsuw)
burn = estimate(spec, 5)
post = estimate(burn, 5)
fore = forecast(post, 4)
apply(fore$forecasts, 1:2, mean) # compute mean forecasts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.