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?
glm()
, 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 inArima
function from theforecast
package, which only fits a standard regression with all input variables. $\endgroup$