Differences

Differences command computes the differenced series for selected time series. Differencing can help stabilize the mean of a time series by removing changes in the level, and so eliminating trend and seasonality (Hyndman and Athanasopoulos, 2014). A differenced series has k fewer values than the original series, where k is the differencing order.

How To

Run: Statistics→Time Series → Differences...

Select one or multiple variables with time series.

If the Remove Mean option is checked the sample mean is first subtracted from the series before the differencing.

Optionally, change the lag for differencing (Differencing lag option) or use the Differences of order option to apply differencing more than one time.

For example, to get the second-order differences set the Repeat Differencing Operation (differencing order) option to two (2) and the Differencing lag option to one (1).

Results

The differenced series of order n is computed for each input time series.

The difference operator is defined as , where  is the lag operator defined as . Then the series of first differences can be written as follow: ; and the differences of order n, produced by the command, can be written as follow:

 

References

Hyndman, R. J., Athanasopoulos, G. (2014). Forecasting: principles and practice, OTexts: Melbourne, Australia.

Enders, W. (2004). "Stationary Time-Series Models". Applied Econometric Time Series (Second ed.). New York: Wiley.