* PS 10.4, using DATA6-3, for Application Section 10.5 TIME 1948 1 SAMPLE 1948 1989 READ(data6-3) YEAR C DI * GENR C1=LAG(C) GENR DI1=LAG(DI) GENR DIFF1=DI-DI1 * * Model A - Static Model with OLS estimation. * OLS C DI / RSTAT * * Model A - Static model with AR(1) error & CORC * AUTO C DI / DROP * * Model A - Static model with AR(1) error & Hildreth-Lu grid search * AUTO C DI / DROP GS * * Fine-tune with specific RHO * AUTO C DI / DROP RHO=0.99093 GEN1 SGMASQR=$SSE/$N PRINT SGMASQR * * Model B - General Dynamic Model with no restrictions. * SAMPLE 1949 1989 OLS C C1 DI DI1 / RESID=UT DLAG * GENR UT1=LAG(UT) GEN1 SSEU=$SSE GEN1 SGMASQU=$SSE/$N GEN1 DFU=$DF * GEN1 LR=-$N*LOG(SGMASQU/SGMASQR) DISTRIB LR / TYPE=CHI DF=1 * * Auxilliary regression for the LM test. * SAMPLE 1950 1989 OLS UT UT1 C1 DI DI1 / DLAG GEN1 LM1=$N*$R2 DISTRIB LM1 / TYPE=CHI DF=1 * * Model C - Restricted model with coefficients for DI and DI1 adding to zero. * SAMPLE 1949 1989 OLS C C1 DIFF1 / RESID=UTT DLAG GENR UTT1=LAG(UTT) GEN1 SSER=$SSE * * Auxilliary Regression for the LM test. * SAMPLE 1950 1989 OLS UTT UTT1 C1 DIFF1 / DLAG GEN1 LM2=$N*$R2 DISTRIB LM2 / TYPE=CHI DF=1 * * Wald test for validity of Model C. * SAMPLE 1949 1989 OLS C C1 DI DI1 TEST DI+DI1=0 * DELETE / ALL STOP