1.

How do we test if a time series data stationary or not programmatically?

Answer»

We can use the Augmented Dickey-Fuller Test (adf test) to test “stationary” aspect. A p-Value of LESS than 0.05 in adf.test() indicates that it is stationary.

Illustrative code snippet:

LIBRARY(tseries) adf.test(MYDATA) # p-value < 0.05 indicates the TS is stationary kpss.test(myData)


Discussion

No Comment Found

Related InterviewSolutions