Moving Averages are frequently used when dealing with time series data. This post shows examples of creating moving averages in SAS, using the Data Step, SAS/IML and PROC EXPAND
Most SAS users are familiar with the data step LAG function to look back on previous observations. Since the data step does not support a LEAD function, fewer SAS users are familiar with looking ahead in a dataset. This post presents different approaches of doing so, some more efficient than others.