11
$\begingroup$

I have a basic question in time series modeling. (using r but the question is not particularly about r)

For a time series with obvious seasonality, shall I use stl (Seasonal and Trend decomposition using Loess) to decompose it into trend, seasonal and remainder, and model the remainder part, or directly model it with a seasonal model such as seasonal arima? The end application would be either forecasting, or detecting outliers/anomalies.

One of the reason I'm asking this, aside from my confusion of which approach is theoretically/practically more sound/viable, is that building a seasonal arima model seems to be particularly slow using auto.arima for long time series, whereas if I remove seasonal effect first and use auto.arima to find a model for the remainder seems much faster.

$\endgroup$
2
  • $\begingroup$ Did you find an answer to this OP? $\endgroup$ Commented Feb 10, 2020 at 4:22
  • $\begingroup$ I think it depends a lot on what your explanatory variables, if any, are going to be. If your explanatory variables are also going to have seasonality then by first removing seasonality you ignore the possibility of cointegrating seasonality. Further your estimation becomes two-step process which is generally less preferable over simultaneous estimation. $\endgroup$
    – Dayne
    Commented Nov 25, 2020 at 3:07

1 Answer 1

1
$\begingroup$
  1. Outliers

Outliers should be easily detected by plotting a box-plot. "In order to be an outlier, the data value must be larger than Q3 by at least 1.5 times the interquartile range (IQR), or. smaller than Q1 by at least 1.5 times the IQR". For a more detailed way of detecting outliers please refer to: https://stackoverflow.com/questions/24750819/outlier-detection-of-time-series-data-in-r

  1. Anomalies

To detect anomalies check this RPubs, it seems quite simple to perform: https://www.rpubs.com/vmez/409672

  1. STL vs seasonal adjustment of arima

From what I know, which is not a lot, the differentiating(d) term of Sarima simply the difference between consecutive observations is computed, where it accounts for the trend. The D component or seasonal differentiating is the difference between an observation and the previous observation from the same season(for monthly data it is y_t-y_t-12). These differentiation techniques are relatively simple comparing to the mathematical computations behind stl(). This thread here will answer your question better: Is stl a good technique for forecasting, instead of Arima? To sum it up: "STL can deal with phenomena such as multiple seasonalities, high-frequency seasonalities better than arima", so it basically depends on your data.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you. the last link provides much insights to understand the difference of the two approach. $\endgroup$ Commented Nov 25, 2021 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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