# How can I determine if a time-series is statistically stable?

I have time-series data that tracks the number of sydromics records my organization receives each week. The number of records had been steadily increasing as more organizations started sending us data and now I'm trying to figure out if the number of messages we see each week has begun to stabilize around a mean over the past few months. Could I simply test if the time series has become stationary? Or use a control chart? I am very stumped as to what tests/techniques to use so I would greatly appreciate some help.

Thank you.

## 2 Answers

There exist various approaches to testing whether a time series is stationary. One of the most popular approaches is based on unit root test family of tests, which include Augmented_Dickey-Fuller (ADF) test (available in R as tseries::adf.test()), Zivot-Andrews test (available in R as urca::ur.za()) and several others (see the links in the unit root test Wikipedia article). Another approach is to use the KPSS test, which is considered complimentary to unit root testing. Finally, there are approaches, based on spectrum analysis, which include Priestley-Subba Rao (PSR) test and wavelet spectrum test. Some theoretic discussion and examples are available via the previous link as well as in corresponding section of the online textbook "Forecasting: principles and practice" by professors Rob J. Hyndman and George Athana­sopou­los: http://www.otexts.org/fpp/8/1.

You're on the right track in trying to identify whether the univariate time series is stationary. There are four assumptions that typically underlie all measurement processes; namely, that the data from the process at hand "behave like": 1. Random drawings; 2. From a fixed distribution; 3. With the distribution having fixed location; and 4. With the distribution having fixed variation.

Stationary data, simply stated, is data whose mean and variance are constant over time and do not follow any trend (#3 and #4 above).

To check if these assumptions hold, you can use the following graphs: 1. Random drawings: lag plot 2. From a fixed distribution: histogram and/or normal probability plot 3. With the distribution having fixed location: run sequence plot 4. With the distribution having fixed variation: run sequence plot

In R, the stats package will provide you with functions to create these plots. Run Sequence plot(x) Lag Plot lag.plot(x) Histogram hist(x) Normal Probability Plot qqnorm(x) qqline(x)

*qqline(x) will add a line to fit the data and will make it easier to judge whether the data follows a fixed distribution