Is there a function or library (like auto_arima to get the order(p,d,q) values) available to calculate the P, D, Q and M values to be used in Seasional_order(P,D,Q,M) in SARIMAX model.
Thanks,
The auto_arima function can do that. You can set the parameter seasonal = True
and give the length of the season with the parameter m
:
auto_arima(y=your_data, seasonal=True, m=length)
If you want to only use the seasonal components without the non-seasonals, then you can manually turn them off by setting the respective parameters to 0:
auto_arima(y=your_data, seasonal=True, m=length, p=0, d=0, q=0)
However, auto_arima cannot really detect whether your data is stationary and therefore, you need to estimate the d
and D
parameters yourself and manually set them in the auto_arima
function.
https://alkaline-ml.com/pmdarima/modules/generated/pmdarima.arima.auto_arima.html