I'm attempting to use the for function to perform numerous arimas.
This is what I've tried so far.
p in 0:20 for
q = for(in 0:20)
for (d from 0:3)
Suitable — Arima
(y, order = c(p, d, q), method = ML)
the accuracy (fit)
For each arima, I want to obtain all the accuracy vectors in one dataset along with three additional columns for p, d, and q.
Then, I'd like to save the model's log-likelihood and AIC.
The result should therefore be a dataframe with each line representing a different model, like this.
ME RMSE MAE MPE MPE MASE ACF1 loglikeli AIC p d q
Training set x x x x x x x
Training set: w w w w w w w w w
Exercise equipment y