I am a total beginner with time series analysis. I use R. I understand that time series data need to be stationary for analyses like cross-correlation or modeling.

I am, however, struggling with determining if my data is stationary. I have data sets with air pollution measurements per hour for 2 weeks per data set. I want to analyse the data per 2 weeks and per day.

I could not really say based on the normal plots if the data is stationary or non-stationary.

I plotted the ACFs for both 2 weeks and 1 day both without and with differencing.

For the 2 week period (second plot is differenced data). ACF plot of data of 2 week period; second plot is differenced data

For a 1 day period (second plot is differenced data). ACF plot of data of 1 day period; second plot is differenced data

I would say (with my very limited knowledge) that the first graphs of both periods do not look stationary, but the differenced data looks like white noise.

I looked a little into the ADF and KPSS test, but my statistical knowledge is not very big, so I do not understand the theory behind it. Also, I do understand how to choose the appropriate k for the ADF test, but when changing k I saw that I can make the p-value lower than 0.05 if I choose the "right" k.

My questions are:

  1. Are the ACF plots of non-differenced data already enough reason to difference the data (because it looks non-stationary)? (taking into account that I am very much a beginner and prefer the easiest method that is acceptable..)

  2. If this is not enough, should I also perform the KPSS and ADF test, and if yes, how should I choose the k for the ADF test?


  1. Also, I tried to calculate the cross-correlation (with Ccf()) and found that the differenced data has, on the few instances I tested it on, a lower correlation than the non-differenced data. I would be interested in understanding why this is the case.



Unnecessary differencing or filtering can inject structure (see Slutsky Effect) . Sometimes a series can have a shift in the mean causing "non-statioanarity" ..the correct remedy is to neither difference or de-trend but to "de-mean" or use a Level Shift variable/filter to render the residual series stationary.

Sometimes there is more than 1 trend requiring a number of trend variables/filters .... none of which have to start at the beginning if the series. Analysis will tell you which of these three approaches

differencing de-meaning de-trending are suitable for your data.


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.