* * Example 10.2.1 from pp 341-342 * open data sbl2.tsm calendar(m) 1975 data(format=free,org=columns) 1975:1 1984:12 step deaths * * The step function could have been created with * set step = t>=1983:2 * * You can do this with a LINREG instruction, but it will be more convenient here * to just use BOXJENK, since it handles bookkeeping for the seasonal differencing. * boxjenk(sdiff=1,apply,reg) deaths / resids # step @regcorrs * * Find the best fitting MA model for the residuals * @bjautofit(qmax=13,pmax=0) resids * * This fits the MA(12) noise term with the intervention variable. This is a very * difficult model to fit and the BOXJENK instruction is unable to estimate it by * maximum likelihood, so we take the MAXL option out. * boxjenk(sdiff=1,ma=12,reg,applydifferences) deaths # step * * This does an alternative noise term which just includes the seasonal MA, * omitting MA(1),...,MA(11). This seems to provide an adequate model. * boxjenk(sdiff=1,sma=1,maxl,reg,applydifferences) deaths # step