* * Example 17.13 from page 699 * Granger causality tests * cal(q) 1979 open data table17-3.prn data(format=prn,org=columns) 1979:1 1988:4 * * This organizes the tests for the various lag lengths by using a DOFOR loop * which loops over a list of values. Because the individual coefficients in the * regressions aren't particularly interesting (and are very difficult to * interpret), we use NOPRINT on the linreg instructions. The EXCLUDE instruction * is used to do the tests of the block zero restrictions. * dofor lags = 2 4 6 8 linreg(noprint) m1 # constant m1{1 to lags} r{1 to lags} exclude # r{1 to lags} linreg(noprint) r # constant m1{1 to lags} r{1 to lags} exclude # m1{1 to lags} end dofor