* * Example 10.1.1 from pp 335-338 * open data ls2.tsm data(format=free,org=columns) 1 150 lead sales * * Difference and pull the means out of the two variables * diff(diffs=1,center) lead / x1 diff(diffs=1,center) sales / x2 * * Fix an MA(1) model to the transformed "lead" series * boxjenk(ma=1,maxl) x1 / zhat * * This use of BOXJENK will filter the series x2 by the same MA(1) filter * estimated for x1. METHOD=EVAL just does a single evaluation at the initial * values provided in the %beta (estimated coefficients) vector. The residuals * are the result of the filter. * boxjenk(ma=1,maxl,initial=%beta,method=eval) x2 / yhat * @crosscorr zhat yhat * * This does the direct estimate of the coefficients in the transfer function. * boxjenk(inputs=1,maxl) x2 # x1 0 1 3 @regcorrs * boxjenk(inputs=1,ma=1,maxl) x2 # x1 0 1 3