Different Order and Seasonal Order in SARIMAX Model: Implications?

2.1k Views Asked by At

Link to code

I'm working with time series data and trying to fit a SARIMAX model using the statsmodels library in Python. I've noticed that in the code, the order and seasonal_order parameters are set differently. q-value is different. Why set it like this? Why is it necessary to set both the order and seasonal_order parameters, and why do they have different q-values?

Here's the code snippet:

import statsmodels.api as sm

mod = sm.tsa.statespace.SARIMAX(y,
                                order=(1, 1, 1),
                                seasonal_order=(1, 1, 0, 12),
                                enforce_stationarity=False,
                                enforce_invertibility=False)

results = mod.fit()

print(results.summary().tables[1])

I would greatly appreciate any insights or guidance on this matter. Thank you!

1

There are 1 best solutions below

2
Bishoy Kamel On

Because you are using SARIMA model this means that there is a seasonal component that you want to fit you model on. Actually, SARIMA model is integrating AR,MA,SAR,SMA models within.

In SARIMA (Seasonal AutoRegressive Integrated Moving Average) modeling, both the order and seasonal_order parameters are used to specify the orders of different components of the model.

  1. order (Non-Seasonal Order):

    • The order parameter specifies the orders of the non-seasonal components of the SARIMA model.
    • It is denoted as (p, d, q), where:
      • p represents the order of the AutoRegressive (AR) component, which captures the linear relationship between the current observation and its past values.
      • d represents the order of differencing required to make the time series stationary. It indicates how many differences you need to take to achieve stationarity.
      • q represents the order of the Moving Average (MA) component, which captures the linear relationship between the current observation and past white noise (residuals) terms.
  2. seasonal_order (Seasonal Order):

    • The seasonal_order parameter specifies the orders of the seasonal components of the SARIMA model.
    • It is denoted as (P, D, Q, s), where:
      • P represents the seasonal order of the Seasonal AutoRegressive (SAR) component, which captures the seasonal linear relationship between the current observation and its past values separated by a seasonal period s.
      • D represents the seasonal order of differencing for seasonal stationarity.
      • Q represents the seasonal order of the Seasonal Moving Average (SMA) component, which captures the seasonal linear relationship between the current observation and past white noise (residuals) separated by a seasonal period s.