# Questions on making data stationary for ARIMA

When doing a time series analysis I have read these instructions :

Step 1 — Check stationarity: If a time series has a trend or seasonality component, it must be made stationary before we can use ARIMA to forecast. .
Step 2 — Difference: If the time series is not stationary, it needs to be stationarized through differencing. Take the first difference, then check for stationarity. Take as many differences as it takes. Make sure you check seasonal differencing as well.
Step 3 — Filter out a validation sample: This will be used to validate how accurate our model is. Use train test validation split to achieve this
Step 4 — Select AR and MA terms: Use the ACF and PACF to decide whether to include an AR term(s), MA term(s), or both.
Step 5 — Build the model: Build the model and set the number of periods to forecast to N (depends on your needs).
Source - https://towardsdatascience.com/time-series-forecasting-arima-models-7f221e9eee06


My questions are on steps one and two.

If I remove the trend and seasonal pattern, what is left of my data? According to this source, after subtracting a trend (calculated with a MA on the frequency of pattern per year), and subtracting a seasonal pattern, what is left is a random component. https://anomaly.io/seasonal-trend-decomposition-in-r/

If this is true, does this mean ARIMA is modeling the random component?

Also, what is the difference between removing the trend and differencing the data, do they have the same effect?

Furthermore, do I need to remove the seasonal component before looking at the ACF, PACF to determine the MA and AR components?

Finally, say I know there is a seasonal pattern. Does that mean I should do a SARIMA(p,d,q,P,D,Q) with D (the seasonal difference) equal to the frequency of the pattern per year? Or should I subtract the trend and seasonal pattern, and do an ARIMA. Would data ever not be stationary if one subtracts the trend and seasonal pattern?

STEP 1 (addend) If a time series has level/step shifts they must be identified and the resultant used to identify the ARIMA model

            If a time series has pulses/spikes they must be identified and the resultant used to identify the ARIMA model

If a time series has seasonal pulses they must be identified and the resultant used to identify the ARIMA model

If a time series has multiple trends they must be identified and the resultant used to identify the ARIMA model


STEP 4A Verify that the parameters of the ARIMA model are constant over time

      Verify that the variance of the errors from the ARIMA model are constant over time otherwise use GLS or a Box-Cox Power transform


ARIMA models the non-deterministic component .

Removing trend , differencing, demeaning (accounting for intercept changes) all have different effects

seasonal arima structure is an integral part of the model and reflects the need for stochastic seasonal structure as contrasted to seasonal dummies

Data would be stationary if one subtracts "trend and seasonal pattern" i.e. nothing gets injected BUT that is not true when you difference in a willy-nilly way as unwarranted differencing creates a non-stationary series.

Perhaps you can pass these useful hints on to your not-so-thorough reference as they are very misleading in their presentation of the steps to identify and refine an arima model.

• You have tooo many questions and for every answer I give you , you will have n more questions. Dialogue is preferable to one-sided written monologues. I suggest that I try and help you off line . You can reach out to me at my contact info. Commented Jun 8, 2019 at 18:47
• Thank you for your reply. I can't find a thorough reference. I have a new post with a more specific question, I think this one was too sloppy. If you have time, could you please give it a look? Commented Jun 8, 2019 at 18:47
• ok ..upvote and .accept my answer to close this question. Commented Jun 8, 2019 at 18:48