I am new to time-series analysis, but I am dealing with a non-seasonal time series data now.

The plot of the data looks like the following, so there might be huge variance at the beginning, and eventually it becomes stable, we believe the curve would finally become stationary as time goes by. enter image description here

The problem is, how could I test if it becomes stationary eventually? or could I detect a certain period that is locally stationary in the data?


Time series data is commonly made stationary through differencing, i.e. computing the difference between consecutive observations of the series. Nearly all time series data does not need to be differenced more than two times in order to achieve stationarity and there are a few ways to detect stationarity in the data.

1) You can use the autocorrelation function to determine if your data is stationary. The 'stats' package in R has a function titled acf() that will plot this for you; if the data is stationary, your plot should lie within the 95% limits imposed.

2) Compute the Ljung-Box Q statistic AFTER you fit an ARIMA model to the series. The test must be computed after as it analyzes the residuals of the model. The Box.test() function in R, from the same 'stats' package, will compute this; if your p > .05, you fail to reject the null hypothesis that the change in the data from observation to observation is inherently random.

3) Simply plot the time series each time after it has been differenced. If the series looks like random noise around the mean of the data with no discernible shape, you can probably infer that the data has achieved stationarity.

There is a great website that explains not only these concepts but ARIMA forecasting in general for time series data. It's certainly not the only way you can do it, but I am a fan. The link is below. Hope it helps!


  • $\begingroup$ Great thanks, the tests are useful and graphs are good, but I am wondering are there some test statistics I could use to claim that the data becomes locally stationary? Maybe I did not state my problems clearly, err.... so the time series is definitely unstationary at the beginning(no matter use the original observations or the differences), but it becomes stationary maybe after 200, 300 days(but we do not know which exactly the day is), so could we say it is locally stationary in the whole time series? and how to test or detect it is locally stationary? $\endgroup$
    – Conta
    Mar 29 '16 at 21:40
  • $\begingroup$ @Conta, thanks for clarifying. If I interpret your comment correctly, you are interested in localized autocovariance estimation of segments, which can allow you to determine at what point that a time series achieves stationarity. There is a terrific article on this at maths.bris.ac.uk/~guy/Research/LSTS/LACF.html. I strongly recommend a thorough reading. The R package 'locits' will provide and plot the estimates using wavelet processes. I would say do NOT parse the series to try and see when it is stationary because that is a method that is too arbitrary. $\endgroup$
    – A. Vezey
    Mar 30 '16 at 14:15
  • $\begingroup$ Great! For others viewing your question, please upvote my comment so that they know this is a valuable resource, and happy forecasting. :) $\endgroup$
    – A. Vezey
    Mar 30 '16 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.