| fit_arima | R Documentation |
Selects the ARIMA (p, d, q) order automatically and returns the
fitted model – the role of forecast::auto.arima. This is the univariate
auto-fit entry point used by
ts_arima() (constructor orders left NULL or set to (0, 0, 0)), and is
exported for standalone reuse (e.g. by harbinger). Its canonical counterpart is
the exported fit_arima() in Python pytspredit.
fit_arima(x, auto = "aicc", max_order = 12, cv_folds = 2, horizon = NULL)
x |
Numeric vector: the training series. |
auto |
Selector: "aicc" (default, compact AICc search approximating
|
max_order |
Cap for the ACF/PACF-driven candidate lags (ARIMA++). |
cv_folds |
Number of rolling origins for the CV selection (ARIMA++). |
horizon |
CV horizon (ARIMA++); NULL -> the detected seasonal period. |
A list with order (the selected c(p, d, q)), include_mean, and the
fitted model (a stats::arima object).
x <- as.numeric(co2)[1:60]
sel <- fit_arima(x)
sel$order
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.