* * Example IBMNYLN.DAT from pp 548-556 * open data ibmnyln.dat data(format=free,org=columns) 1 242 date london ny * graph(footer="Figure 13-12 IBM Stock Price, New York and London",key=attached,$ vlabel="NY in $, London in pounds") 2 # london # ny * @crosscorr(report) london ny * @bjident(diffs=1) london * * Analysis with London price as possible leading variable * boxjenk(diffs=1,const) london @regcorrs boxjenk(diffs=1) london @regcorrs boxjenk(diffs=1,ma=1) london set londone = %resids * * This uses the last ARIMA model to filter the NY variable. The output of this is * in the %resids series. * boxjenk(diffs=1,ma=1,method=eval,initial=%beta) ny set newyorke = %resids @crosscorr(report) londone newyorke * * Analysis with New York price as possible leading variable * boxjenk(diffs=1) ny @regcorrs * diff ny / newyorke diff london / londone * @crosscorr(report) newyorke londone * * Do the base transfer function model * boxjenk(const,inputs=1) londone # newyorke 0 0 1 @regcorrs * * Add in the MA(1) noise term and drop the constant * boxjenk(ma=1,inputs=1) londone # newyorke 0 0 1 @regcorrs * * Check the cross correlations * @crosscorr newyorke %resids * * Rerun regression in undifferenced variables * boxjenk(diffs=1,ma=1,inputs=1,applydiffs) london # ny 0 0 1 prj fitted print(picture="*.###") 100 150 ny london fitted %resids