Description Usage Arguments Details Value Examples
predict with conjugate Normal-Inverse-Wishart bayesian VAR model
1 2 3 4 |
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 |
predict with conjugate Normal-Inverse-Wishart bayesian VAR model
forecast results
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.