I am trying to create a set of all possible models for 1 variable using 10 predictors.
I know how to to this for the LM model, but is there a way how to create it for ARIMA models?
Or would it be OK to take fitted values and add them to lm model?
Thank you!
Edit: I have created a list of all combinations of predictors and I made benchmark ARIMA model, into which I want to add external variables- Comp.1 : Comp.10 They are stored in a list, and look like:
$`1`
prod.index.rnd ~ prod.index.arima.fitted + Comp.1 + Comp.2 + Comp.3 + Comp.4 + Comp.5 + Comp.6 + Comp.7
<environment: 0x0000000009122710>
$`2`
prod.index.rnd ~ prod.index.arima.fitted + Comp.2 + Comp.3 + Comp.4 + Comp.5 + Comp.6 + Comp.7
<environment: 0x0000000009124548>
For example, It should look like:
Predicted variable is a time series of insdustrial production, named "prod.index.rnd"
models I would like to create should look like:
arima(prod.index.rnd, xreg = Comp.1 + Comp.2 + Comp.3 + Comp.4 + Comp.5 + Comp.6 + Comp.7)
arima(prod.index.rnd, xreg = Comp.1 + Comp.2 + Comp.3 + Comp.4 + Comp.5)
arima(prod.index.rnd, xreg = Comp.1 + Comp.2)
and simmilar for all other combinations
I have tried to use
substring(all.arts.entertainment.models.list[5], 44)
Which returns
[1] "Comp.1 + Comp.2 + Comp.4 + Comp.5 + Comp.6 + Comp.7"
Of class charater and therefore cannot be used as xreg input.
What is the best way to get this result so I can use it as the xreg argument?
Thanks!