How the function auto.arima() in R determines d?
Question: What is the test used in auto.arima() function in R to determine stationarity
i.e to determine the value of "d" Can that logic be implemented in python?


Answer: This [link](https://www.otexts.org/fpp/8/7) says it is determined using
repeated KPSS tests. I see no reason why it couldn't be implemented in Python,
it would just need to be written. Otherwise, you could use
[rpy2](http://rpy.sourceforge.net/rpy2/doc-dev/html/introduction.html) and
just call `auto.arima` from python.

    
    
    from rpy2 import *
    import rpy2.robjects as RO
    
    RO.r('library(forecast)')
    
    # use example WWWusage data
    RO.r('fit <- auto.arima(WWWusage)')
    

