Description Usage Arguments Details Value See Also Examples
View source: R/auto_arima_cv.R
This function finds the ARIMA model that minimizes average RMSE via grid search and time-series cross validation. All cominations of (p, d, q) and (P, D, Q) terms are considered, as well as the inclusion of exogenous regressors.
1 2 3 4 5 6 |
y |
A numeric vector |
x |
A numeric matrix of dimension n,k where n is the length of |
p |
Max AR order |
d |
Max degree of differencing |
q |
Max MA order |
P |
Max seasonal AR order, defaults to 0 if period is |
D |
Max seasonal degree of differencing, defaults to 0 if period is |
Q |
Max seasonal MA order, defaults to 0 if period is |
period |
Frequency of the time series |
max_parameters |
Max sum of AR, MA, seasonal AR, seasonal MA, and k |
initialWindow |
The initial number of consecutive values in each training set sample, defaults to 70% of length(y) |
horizon |
The number of consecutive values in test set sample |
fixedWindow |
Logical, if |
skip |
Integer, how many (if any) resamples to skip to thin the total amount |
include.mean |
Should the ARMA model include a mean/intercept term?
The default is |
transform.pars |
Logical; if true, the AR parameters are transformed to ensure that they remain in the region of stationarity.
Not used for |
fixed |
Optional numeric vector of the same length as the total number of parameters. If supplied, only |
method |
Fitting method: maximum likelihood or minimize conditional sum-of-squares. The default (unless there are missing values) is to use conditional-sum-of-squares to find starting values, then maximum likelihood. Can be abbreviated. |
Optional |
numeric vector of initial parameter values. Missing values will be filled in, by zeroes except for regression
coefficients. Values already specified in |
If a parallel backend is registered, this function runs in parallel via %dopar%.
If a model does not converge it does not appear in the average RMSE calculation.
A list containing the following:
best_model
The ARIMA model with the lowest RMSE
best_model_params
The best ARIMA model parameters, and RMSE
best_index
THe row number of the best ARIMA model in the grid
grid
The grid of all possible ARIMA models, and corresponding average RMSE found via CV
inputs
A list of inputs provided to auto_arima_cv()
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.