predict.varest {vars} | R Documentation |
Forecating a VAR object of class ‘varest
’ with
confidence bands.
## S3 method for class 'varest': predict(object, ..., n.ahead = 10, ci = 0.95)
object |
An object of class ‘varest ’; generated by
VAR() . |
n.ahead |
An integer specifying the number of forecast steps. |
ci |
The forecast confidence interval |
... |
Currently not used. |
The n.ahead
forecasts are computed recursively for the
estimated VAR, beginning with h = 1, 2, ..., n.ahead:
y_{T+1 | T} = A_1 y_T + ... + A_p y_{T+1-p} + C D_{T+1}
The variance-covariance matrix of the forecast errors is a function of Σ_u and Phi_s.
A list with class attribute ‘varprd
’ holding the
following elements:
fcst |
A list of matrices per endogenous variable containing the forecasted values with lower and upper bounds as well as the confidence interval. |
endog |
Matrix of the in-sample endogenous variables. |
model |
The estimated VAR object . |
Bernhard Pfaff
Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton.
Lütkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.
data(Canada) var.2c <- VAR(Canada, p = 2, type = "const") predict(var.2c, n.ahead = 8, ci = 0.95)