* * Example 1.5.1 from pp 25-26 * open data strikes.dat calendar 1951 data(format=free,org=columns) 1951:1 1980:1 strikes * * The filter described in the text is done using the FILTER option with the * options TYPE=CENTERED, WIDTH=5, and EXTEND=REPEAT. For a centered filter like * this, the width is 2q+1 (the total number of terms). EXTEND=REPEAT requests the * handling of the endpoints described (repeating the first and last values * out-of-sample). * filter(type=centered,width=5,extend=repeat) strikes / sstrikes graph(footer="Figure 1-18 Simple 5-term Moving Average of Strike Data",overlay=dots,ovsame) 2 # sstrikes # strikes * set yhat = strikes-sstrikes graph(footer="Figure 1-19 Residuals after Subtracting Moving Average") # yhat print / test sstrikes