Define some data:
To compute the differences between terms in the data, the Difference command is used.
The times option makes it possible to apply the difference multiple times.
Note that this is equivalent to running:
The lag option staggers the differencing. Using a lag of 2 subtracts the first value from the third value, the second from the fourth, and so on:
The Difference command can also be applied directly to TimeSeries data.