Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict

Predict method for objects of class varest and vec2var


Description

Forecating a VAR object of class ‘varest’ or of class ‘vec2var’ with confidence bands.

Usage

## S3 method for class 'varest'
predict(object, ..., n.ahead = 10, ci = 0.95, dumvar = NULL)
## S3 method for class 'vec2var'
predict(object, ..., n.ahead = 10, ci = 0.95, dumvar = NULL)

Arguments

object

An object of class ‘varest’; generated by VAR(), or an object of class ‘vec2var’; generated by vec2var().

n.ahead

An integer specifying the number of forecast steps.

ci

The forecast confidence interval

dumvar

Matrix for objects of class ‘vec2var’ or ‘varest’, if the dumvar argument in ca.jo() has been used or if the exogen argument in VAR() has been used, respectively. The matrix should have the same column dimension as in the call to ca.jo() or to VAR() and row dimension equal to n.ahead.

...

Currently not used.

Details

The n.ahead forecasts are computed recursively for the estimated VAR, beginning with h = 1, 2, …, n.ahead:

\bold{y}_{T+1 | T} = A_1 \bold{y}_T + … + A_p \bold{y}_{T+1-p} + C D_{T+1}

The variance-covariance matrix of the forecast errors is a function of Σ_u and Φ_s.

Value

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.

exo.fcst

If applicable provided values of exogenous variables, otherwise NULL.

Author(s)

Bernhard Pfaff

References

Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton.

Lütkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.

See Also

Examples

data(Canada)
var.2c <- VAR(Canada, p = 2, type = "const")
predict(var.2c, n.ahead = 8, ci = 0.95)

vars

VAR Modelling

v1.5-3
GPL (>= 2)
Authors
Bernhard Pfaff [aut, cre], Matthieu Stigler [ctb]
Initial release
2018-08-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.