Search code examples
pythonmachine-learningarimaautocorrelation

Determining p,q from acf and pacf python


I'm having difficulties understanding how to determine p and q in ARIMA. What i understand is PACF cut off determines p and ACF hit very low determines q but at the same time the cut off in PACF which is determines p is equal to AR(q)? I'm still very confused. Then i tried it myself building ARIMA model and i get this ACF and PACF. And i assume that the p is 16 because it's cut off (hit zero abruptly) at lag 16. The q is 1 because it hits very low at lag 1. So my ARIMA order would be (16,0,1). Am i wrong? i learn it from kaggle and here. I don't know if i understand it right

plot


Solution

  • Correlations which are within the blue bands are not statistically significant and so it doesn't look as though you have a model. There is a great tutorial here https://www.statsmodels.org/stable/examples/notebooks/generated/tsa_arma_0.html on using Python for ARMA models.