1
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Stepwise is a terrible method of variable selection. This has been discussed here many times. $\endgroup$ – Peter Flom Jan 14 at 12:21
  • $\begingroup$ @PeterFlom thank you for your comment -- I appreciate stepwise has some limitations, but my question is not about its advantages or disadvantages, it's about applying stepwise in Arima function. $\endgroup$ – Dmitry Ishutin Jan 14 at 13:35
  • $\begingroup$ @PeterFlom: What method of variable selection would you recommend instead of the stepwise method? $\endgroup$ – Isabella Ghement Jan 14 at 15:34
  • 1
    $\begingroup$ The best is substantive knowledge and a priori hypotheses. For automatic methods, I like LASSO. $\endgroup$ – Peter Flom Jan 14 at 21:00
  • 1
    $\begingroup$ @IsabellaGhement, thank you for your inputs. I will try as you suggested to use 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 in Arima function from the forecast package, which only fits a standard regression with all input variables. $\endgroup$ – Dmitry Ishutin Jan 16 at 10:53
2
$\begingroup$

Stepdown deleting non-significant arima structure married with stepup remedies base upon the "current set of model errors" possibly incorporating both arima structure and waiting to be discovered Intervention variables https://pdfs.semanticscholar.org/09c4/ba8dd3cc88289caf18d71e8985bdd11ad21c.pdf is quite useful as is described here Is it possible to automate time series forecasting? and here where @Adamo opines Interrupted Time Series Analysis - ARIMAX for High Frequency Biological Data?

Essentially arima model identification starts with the assumption of a simple mean nodel and then recursively adds structure that appears to be evidented/needed and proceeds until signal is separated from noise including stepping up when evidence is present regarding lack of constancy of the model error variance or lack of constancy of parameters over time . Modelling time series is much like peeling an onion to get to the heart of the matter i.e. the underlying sufficient signal.

$\endgroup$
  • $\begingroup$ thank you for your answer, but I don't see how it answers my question. $\endgroup$ – Dmitry Ishutin Jan 14 at 13:39
  • $\begingroup$ stats.stackexchange.com/questions/380599/… should be very valuable to you to help you formulate a modified ARIMA function as to my knowledge none exists in the world of free software. My answer to some extent was directed to modify @PeterFlom's reflections . Perhaps we can chat off line and you can better detail what you would like to accomplish . If you want to emulate the flow diagram you might have to write some code once you understood how to precisely do it. $\endgroup$ – IrishStat Jan 14 at 14:46
  • $\begingroup$ Beautiful onion metaphor! It essentially applies to statistical modelling as a whole. $\endgroup$ – Isabella Ghement Jan 14 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.