forecast
Description
forecast
is well suited for computing out-of-sample unconditional forecasts of a Bayesian VAR(p) model that does not contain an exogenous regression component. For advanced applications, such as out-of-sample conditional forecasting, VARX(p) model forecasting, missing value imputation, and Gibbs sampler specification for posterior predictive distribution estimation, see simsmooth
.
returns a path of forecasted responses YF
= forecast(PriorMdl
,numperiods
,Y
)YF
over the length numperiods
forecast horizon. Each period in YF
is the mean of the posterior predictive distribution, which is derived from the posterior distribution of the prior Bayesian VAR(p) model
PriorMdl
given the response data Y
. The output YF
represents the continuation of Y
.
NaN
s in the data indicate missing values, which forecast
removes using list-wise deletion.
Examples
Input Arguments
Output Arguments
More About
Tips
Monte Carlo simulation is subject to variation. If
forecast
uses Monte Carlo simulation, then estimates and inferences might vary when you callforecast
multiple times under seemingly equivalent conditions. To reproduce estimation results, set a random number seed by usingrng
before callingforecast
.
Algorithms
If the posterior predictive distribution is analytically intractable (true for most cases),
forecast
implements Markov Chain Monte Carlo (MCMC) sampling with Bayesian data augmentation to compute the mean and standard deviation of the posterior predictive distribution. To do so,forecast
callssimsmooth
, which uses a computationally intensive procedure.Most Econometrics Toolbox™
forecast
functions accept an estimated or posterior model object from which to generate forecasts. Such a model encompasses the parametric structure and data. However, theforecast
function of Bayesian VAR models requires presample and estimation sample data to do the following:Perform Bayesian parameter updating to estimate posterior distributions.
forecast
implements MCMC sampling with Bayesian data augmentation, which includes a Kalman filter smoothing step that requires the entire observed series.Predict future responses in the presence of two sources of uncertainty:
Estimation noise ε1,…,εT, which induces parameter uncertainty
Forecast period noise εT+1,…,εT+
numperiods
References
[1] Litterman, Robert B. "Forecasting with Bayesian Vector Autoregressions: Five Years of Experience." Journal of Business and Economic Statistics 4, no. 1 (January 1986): 25–38. https://doi.org/10.2307/1391384.
Version History
Introduced in R2020a