1

I want to know the orders (p,d,q) for ARIMA model, so I've got to use pmdarima python package. but it recommends me SARIMAX model! keep reading for more details.
i used Daily Total Female Births Data for this purpose. it's a stationary time series.

# importing packages
import pandas as pd
from pmdarima import auto_arima
import warnings
warnings.filterwarnings('ignore')

# read csv file
df = pd.read_csv('/Data/DailyTotalFemaleBirths.csv' , index_col=0 , parse_dates=True)

# set daily frequency for datetime indexes
df.index.freq = 'D'

# now using auto_arima i try to find (p,d,q) orders for ARIMA model.
# so i set seasonal=False because i don't want orders for SARIMA! my
# goal is to find orders for ARIMA model not SARIMA
auto_arima(df['Births'] , start_P= 0 , start_q=0 , max_p=6 , 
            max_q=3 , d=None , error_action='ignore' , suppress_warnings=True ,
            m=12 , seasonal=False , stepwise=True).summary()

then it gives me this:
enter image description here

the problem is where although I set seasonal=False but it gives me SARIMAX (which stands for Seasonal Autoregressive Independent Moving Average) but I don't want to consider seasonal component, so I set seasonal=False! seems that pmdarima doesn't pay attention to seasonal=False!

can someone help me to figure out what is the problem?


Expected result:
enter image description here

for False Result: SARIMAX result comes from pmdarima version 1.8.3
for True Result: ARIMA result comes from pmdarima version 1.1.0

Shayan
  • 5,165
  • 4
  • 16
  • 45
  • 1
    Looks like this changed in version [v1.5.1](https://github.com/alkaline-ml/pmdarima/blob/7c7618a79628d3deab8427e7c4aa5ebb89b505d9/doc/whats_new.rst#v151). pmdarima always uses SARIMAX now. – Nick ODell Oct 11 '21 at 15:39
  • @NickODell are you sure? so you mean it's not a problem? **additional details:** in `pmdarima` version `1.8.3`, and exactly in this example; when I run `auto_arima(...).seasonal_order` it gives me `(0,0,0,0)` which can be interpreted as ignoring seasonal component I guess. what do you think about this? – Shayan Oct 11 '21 at 16:24
  • 1
    I agree - that's the default value for the seasonal_order component, and per the documentation, the default seasonal order has no effect: `Default is no seasonal effect.` https://github.com/statsmodels/statsmodels/blob/e80fcedb71205ca26c345bd34389bacee36b0e53/statsmodels/tsa/statespace/sarimax.py#L50 – Nick ODell Oct 11 '21 at 16:29
  • @NickODell Thanks! I saw your mentioned references. so there's no problem there. Thank you for your help! it would be great if you Answer This Question then I'll verify it. – Shayan Oct 11 '21 at 16:35

1 Answers1

3

It's not really using a seasonal model. It's just a confusing message.

In the pmdarima library, in version v1.5.1 they changed the statistical model in use from ARIMA to a more flexible and less buggy model called SARIMAX. (It stands for Seasonal Autoregressive Integrated Moving Average Exogenous.)

Despite the name, you can use it in a non-seasonal way by setting the seasonal terms to zero.

You can double-check whether the model is seasonal or not by using the following code:

model = auto_arima(...)
print(model.seasonal_order)

If it shows as (0, 0, 0, 0), then no seasonality adjustment will be done.

Nick ODell
  • 15,465
  • 3
  • 32
  • 66