FILE PROC granger.prc * Testing for Granger causality * Example from section 18.5 (pages 767-770) of * Judge, Hill, Griffiths, Lutkepohl and Lee, 1988, * Introduction to the Theory and Practice of Econometrics, * 2nd Edition, Wiley. SAMPLE 1 75 READ (judge18.txt) Y1 Y2 SAMPLE 1 71 VARS: Y1 Y2 * Specify the order of the VAR process GEN1 NLAG=1 EXEC GRANGER * Output statistics: * TEST1 - Test statistic for H0: Y2 does not Granger-cause Y1 * TEST2 - Test statistic for H0: Y1 does not Granger-cause Y2 * CRIT05 - 5% critical value from a F(DF1,DF2) distribution. * PVAL1 - p-value for TEST1 * PVAL2 - p-value for TEST2 PRINT TEST1 PVAL1 TEST2 PVAL2 DF1 DF2 CRIT05 * Now test for various lag orders DIM TESTA 6 PVALA 6 TESTB 6 PVALB 6 DFA 6 DFB 6 CRIT 6 DO %=1,6 SAMPLE 1 71 GEN1 NLAG=% EXEC GRANGER GEN1 TESTA:%=TEST1 GEN1 PVALA:%=PVAL1 GEN1 TESTB:%=TEST2 GEN1 PVALB:%=PVAL2 GEN1 DFA:%=DF1 GEN1 DFB:%=DF2 GEN1 CRIT:%=CRIT05 ENDO * Print results SAMPLE 1 6 GENR LAG=TIME(0) FORMAT(F6.0,2(F8.2,F8.4),2F6.0,F8.2) PRINT LAG TESTA PVALA TESTB PVALB DFA DFB CRIT / FORMAT STOP