forecast
Forecast vector error-correction (VEC) model responses
Syntax
Description
returns a path of minimum mean squared error (MMSE) forecasts (Y
= forecast(Mdl
,numperiods
,Y0
)Y
)
over the length numperiods
forecast horizon using the fully
specified VEC(p – 1) model Mdl
. The forecasted
responses represent the continuation of the presample data
Y0
.
uses additional
options specified by one or more name-value arguments. For example, Y
= forecast(Mdl
,numperiods
,Y0
,Name,Value
)'X',X,'YF',YF
specifies
X
as future exogenous predictor data for the regression
component and YF
as future response data for conditional
forecasting.
Examples
Input Arguments
Output Arguments
Algorithms
forecast
estimates unconditional forecasts using the equationwhere t = 1,...,
numperiods
.forecast
filters anumperiods
-by-numseries
matrix of zero-valued innovations throughMdl
.forecast
uses specified presample innovations (Y0
) wherever necessary.forecast
estimates conditional forecasts using the Kalman filter.forecast
represents the VEC modelMdl
as a state-space model (ssm
model object) without observation error.forecast
filters the forecast dataYF
through the state-space model. At period t in the forecast horizon, any unknown response iswhere s < t, is the filtered estimate of y from period s in the forecast horizon.
forecast
uses specified presample values inY0
for periods before the forecast horizon.
The way
forecast
determinesnumpaths
, the number of pages in the output argumentY
, depends on the forecast type.If you estimate unconditional forecasts, which means you do not specify the name-value pair argument
YF
, thennumpaths
is the number of pages in the input argumentY0
.If you estimate conditional forecasts and
Y0
andYF
have more than one page, thennumpaths
is the number of pages in the array with fewer pages. If the number of pages inY0
orYF
exceedsnumpaths
, thenforecast
uses only the firstnumpaths
pages.If you estimate conditional forecasts and either
Y0
orYF
has one page, thennumpaths
is the number of pages in the array with the most pages.forecast
uses the array with one page for each path.
forecast
sets the time origin of models that include linear time trends (t0) tosize(Y0,1)
–Mdl.P
(after removing missing values). Therefore, the times in the trend component are t = t0 + 1, t0 + 2,..., t0 +numobs
. This convention is consistent with the default behavior of model estimation in whichestimate
removes the firstMdl.P
responses, reducing the effective sample size. Althoughforecast
explicitly uses the firstMdl.P
presample responses inY0
to initialize the model, the total number of observations (excluding missing values) determines t0.
References
[1] Hamilton, James D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
[2] Johansen, S. Likelihood-Based Inference in Cointegrated Vector Autoregressive Models. Oxford: Oxford University Press, 1995.
[3] Juselius, K. The Cointegrated VAR Model. Oxford: Oxford University Press, 2006.
[4] Lütkepohl, H. New Introduction to Multiple Time Series Analysis. Berlin: Springer, 2005.