I understand that p represents the order of the AR model used within the ARIMA model, but does that have anything to do with the lag value that is calculated by the IC (eg. aic, bic, hic) in the AR model?
When I fit an AR model to some data and print the lag value used, it is somewhere around 40. However when I try to fit an ARIMA model with parameters (40,0,0) it takes an extremely long time. I know there is some gap in my understanding but I'm in the position where I don't know what I don't know.
I am using the AR and ARIMA models provided by the python module statsmodels. Thanks in advance if anyone can help me out!