bvar_conj_forecast: predict with conjugate Normal-Inverse-Wishart bayesian VAR...

Description Usage Arguments Details Value Examples

Description

predict with conjugate Normal-Inverse-Wishart bayesian VAR model

Usage

1
2
3
4
bvar_conj_forecast(model, Y_in = NULL, Z_f = NULL, output = c("long",
  "wide"), h = 1, out_of_sample = TRUE, type = c("prediction",
  "credible"), level = c(80, 95), include = c("mean", "median", "sd",
  "interval", "raw"), fast_forecast = FALSE, verbose = FALSE)

Arguments

model

estimated conjugate N-IW model

Y_in

(NULL by default) past values of endogeneous variables (shold have at least p observations). If NULL, then Y_in supplied for estimation will be used. For out-of-sample forecast only last p values of Y_in are used

Z_f

future values of exogeneous variables

output

(default 'long') — long or wide table for mean/quantiles of forecasts

h

number of periods for forecasting

out_of_sample

logical, default is TRUE, whether forecasts are out-of-sample or in-sample. If forecasts are not out-of-sample, then parameter h is ignored

type

('prediction' by default) type of interval: 'prediction' incorporates uncertainty about future shocks; 'credible' deals only with parameter uncertainty.

level

confidence levels for prediction intervals

include

(default is c('mean', 'median', 'sd', 'raw')) what type of summary to provide If 'raw' is present raw forecasts will be reported. If only 'raw' is present then function will return coda mcmc object with raw forecasts. Otherwise raw forecasts will be attached as attribute.

fast_forecast

logical, FALSE by default. If TRUE then only mean forecast is calculated, posterior expected values of hyperparameters are used. No confidence intervals, no sd, no median. This mode is activated by default if there are no simulations in supplied model.

verbose

(default FALSE) if true some messages will be printed

Details

predict with conjugate Normal-Inverse-Wishart bayesian VAR model

Value

forecast results

Examples

1
2
3
4
5
data(Yraw)
setup <- bvar_conj_setup(Yraw, p = 4)
model <- bvar_conj_estimate(setup, keep = 100)
bvar_conj_forecast(model, h=2, output = 'wide')
bvar_conj_forecast(model, out_of_sample = FALSE, include = 'mean')

bdemeshev/bvarr documentation built on May 12, 2019, 3:40 a.m.