Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have daily data set and it's a non-stationary series, then what is the lag I have to consider for the first difference 1 or 7?

share|improve this question
up vote 5 down vote accepted

This depends on the form of nonstationarity. If it is a because of a linear trend then you take a first difference. If it is a season of period 7 then it would be seven. However the method of detrending does depend on the type of trend. Knowing only that the series is nonstationary is not sufficient to answer the question.

share|improve this answer
And there is a difference between differencing and detrending. – Wayne Jun 27 '12 at 12:55
Yes but differencing is a form of detrending. – Michael Chernick Jun 27 '12 at 13:57
thank you very much. – Anthony Jun 27 '12 at 14:56

If a series is non-stationary in the mean then there are two distinctly different ways to approach this problem. The actual data will tell you which is the best remedy. Let us for the moment assume that we have detected the presence of non-stationarity. In effect, we have a symptom and need to apply the appropriate remedy. We will consider two remedies 1) differencing the series and 2) detrending/demeaning. The first remedy is to create a surrogate series be it the differences of order k (1 or the frequency of the data). We will take enough, but not too many differences in order to approximate stationarity. The second approach has two options a) and b), both of which might be necessary. Option a is to adjust the original series for one or more deterministic trends (unspecified input series ) e.g.(1,2,3,4,....t ; 0,0,0,0,1,2,3,..t ; 0,0,0,0,0,0,0,0,1,2,...t) as needed. The second option b) is to adjust for a step/level shift in the mean by adjusting for unspecified input series e.g. 0,0,0,0,0,1,1,1,1,1,...1 ; By actually trying/evaluating these two alternative remedies one can directly deduce the "best remedy" for any particular data set. Box and Jenkins by ignoring the second of the two options and only focusing on the first (differencing) made a tactical mistake. Later researchers like I.Chang, Bill Bell, G. Tiao , D. Downing to name a few, introduced the second remedy as a possible alternative to differencing.

share|improve this answer
Darryl Downing is a colleague and good friend of mine as he is with you. Can you give me a reference to his paper? I am not familiar with it. He and I did publish a paper in JASA 1982 on detecting outliers in time series. – Michael Chernick Jul 26 '12 at 14:14
@Michael , I think this paper might be relevant . Makridakis in critically reflects on differencing while suggesting what I believe is an inferior solution. Another reference is Nathan Balke Balke,N, Detecting level shifts in time series, JBES,1993). – IrishStat Jul 26 '12 at 21:22
Thanks so much. – Michael Chernick Jul 26 '12 at 21:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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