* * Example 7.3.2 from pp 238-241 * open data ls2.tsm data(format=free,org=columns) 1 150 lead sales * * Fit ARMA models to the first differences of the two series. Save the residuals * and also the maximum likelihood estimates of the variances. (%SEESQ is * adjusted for degrees of freedom). * boxjenk(diffs=1,ma=1,demean,maxl) lead / wlead compute leadvar =%seesq*%ndf/%nobs boxjenk(diffs=1,ar=1,ma=1,demean,maxl) sales / wsales compute salesvar=%seesq*%ndf/%nobs * @crosscorr wsales wlead * * Compute an estimate for the coefficient on the third lag of the lead variable * compute bhat=sqrt(salesvar/leadvar) disp "Estimated Coefficient on transfer model" bhat * * Compute the stationary noise from the two residuals processes. * Identify and estimate a noise model for it * set nt = wsales-bhat*wlead{3} @bjident nt boxjenk(ma=1,demean,maxl) nt