Vector autoregressive model Calls vars::VAR from package vars.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("forecast.VAR")
lrn("forecast.VAR")

Meta Information

  • Task type: “forecast”

  • Predict Types: “response”, “se”

  • Feature Types: “numeric”

  • Required Packages: mlr3, vars

Parameters

IdTypeDefaultRange
pinteger1\([0, \infty)\)
lag.maxintegerNULL\([1, \infty)\)
seasonintegerNULL\([1, \infty)\)

See also

Other Learner: LearnerForecast, mlr_learners_regr.arima, mlr_learners_regr.auto_arima, mlr_learners_regr.average

Super classes

mlr3::Learner -> mlr3temporal::LearnerForecast -> LearnerVAR

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method forecast()

Returns forecasts after the last training instance.

Usage

LearnerRegrForecastVAR$forecast(h = 10, task, new_data = NULL)

Arguments

h

(numeric(1))
Number of steps ahead to forecast. Default is 10.

task

(Task).

new_data

(data.frame())
New data to predict on.

Returns

Prediction.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrForecastVAR$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

learner = mlr3::lrn("forecast.VAR")
print(learner)
#> <LearnerVAR:forecast.VAR>
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, vars
#> * Predict Types:  [response], se
#> * Feature Types: numeric
#> * Properties: exogenous, missings, multivariate

# available parameters:
learner$param_set$ids()
#> [1] "p"       "lag.max" "season"