I am fitting a regression model with ARIMA errors in R using the Arima function from the forecast package. I assume that the function takes all predictors from a matrix that I assign to the xreg argument. Thus regression is fitted using all of them and the output is produced accordingly.
Now, I appreciate that coefficients with high p-values are likely to have no impact on the overall outcome, however I would like to understand how I could fit a stepwise regression using Arima function.
On a side note, how would I go about fitting a regularised regression (LASSO or ridge) with ARIMA errors -- either through Arima function, or other means?
auto.arimaautomatically selects the structure of ARIMA as per the custom stepwise algorithm outlined in this paper. It does not do stepwise regression with subsequent ARIMA fitting. – Dmitry Ishutin Jan 14 '19 at 16:01glm(), but I have a highly seasonal data with multiple seasonal cycles, hence I know that residuals will always be seasonally correlated, therefore I am fitting SARIMA to tackle this.I am still looking forward to a tidy solution where both stepwise regression and ARIMA fitting could be done on the fly, like it's done in
– Dmitry Ishutin Jan 16 '19 at 10:53Arimafunction from theforecastpackage, which only fits a standard regression with all input variables.Arima()-like function – Dmitry Ishutin Jan 16 '19 at 10:57