![Difference operators as matrices](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
For a time series { y1, y2, ..., yN }, the difference operator computes the difference between two observations. The kth-order difference is the series { yk+1 - y1, ..., yN - yN-k }. In SAS, the DIF function in the DATA step computes differences between observations. The DIF function