* Reference: Chapters 11 and 12 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 691 READ (NYSE.shd) price return return_1 t price_1 price_2 cprice cprice_1 * Example 11.4 GENR r1=LAG(return) SAMPLE 3 691 * Equation (11.16), p. 356. OLS return r1 * Equation (11.18), p. 357 GENR r2=LAG(return,2) SAMPLE 4 691 * The ANOVA option on the OLS command gives an F-test for the * overall significance of the regression. OLS return r1 r2 / ANOVA * Examples 12.8 and 12.9 SAMPLE 3 691 OLS return r1 / RESID=u DIAGNOS / HET * The DIAGNOS / HET command reports a variety of tests for * heteroskedasticity for the previous OLS estimation. * The output based on the auxiliary regression in Example 12.8 is: * E**2 ON X: KOENKER(R2): * The output based on the auxiliary regression in Example 12.9 is: * E**2 ON LAG(E**2) ARCH TEST: * The reported test statistics are the N*R-square -- * see Equation (8.16), p. 257. * The results from the DIAGNOS / HET command can be replicated * with SHAZAM commands as shown below. GENR u2=u*u * Equation (12.48), p. 400 OLS u2 r1 * Calculate the LM test statistic stated in Equation (8.16). GEN1 LM=$N*$R2 * Calculate a p-value SAMPLE 1 1 DISTRIB LM / TYPE=CHI DF=1 CDF=cdf GEN1 p_value=1-cdf PRINT LM p_value SAMPLE 3 691 * Equation (12.51), p. 402 OLS u2 u2(1.1) GEN1 LM=$N*$R2 PRINT LM * The HET command implements maximum likelihood estimation * of models with ARCH errors. HET return r1 / MODEL=ARCH STOP