forecast_var: Forecast using VAR model

Description Usage Arguments Details Value Examples

View source: R/forecast.R

Description

forecast_var forecasts time series using VAR model

Usage

1
forecast_var(y, h = 1, model = NULL, ...)

Arguments

y

multivariate time series

h

forecast horizon

model

estimated VAR model. If missing will be estimated automatically.

...

further arguments passed to estimate_var and than to VAR function

Details

Models are estimated using VAR function from vars package if necessary.

Value

forecasts from VAR model as mforecast object

Examples

1
2
3
data(rus_macro)
y_small <- rus_macro[, c("cpi", "employment", "m2")]
var_forecast <- forecast_var(y_small, h = 2, p = 1)

bdemeshev/torro documentation built on May 21, 2019, 8:36 a.m.