Skip to contents

Differences chosen by the KPSS test and by the strength of seasonality, orders by a stepwise search on the information criterion (Hyndman & Khandakar, 2008). In a backtest the choice is made again at every origin, so the whole procedure is judged, not one lucky specification.

Usage

model_auto_arima(
  criterion = c("aicc", "aic", "bic"),
  d = NULL,
  seasonal_d = NULL,
  max_order = c(5, 5, 2, 2),
  regressors = NULL
)

Arguments

criterion

"aicc", "aic" or "bic".

d, seasonal_d

Fix the number of differences instead of testing.

max_order

Largest p, q, P and Q.

regressors

External variables, a data frame, matrix or named list of numeric columns with one row per period from the first observation on; to forecast, the rows must also cover the horizon. The model becomes a regression with ARIMA errors. See fourier_terms().

Value

A model specification, to use with fit_model(), forecast_model() or backtest().

Examples

fit <- fit_model(model_auto_arima(), log(AirPassengers))
fit$details$order
#> [1] 0 1 1
fit$details$seasonal_order
#> [1] 0 1 1