* Reference: Chapters 10 and 12 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 38 READ (PRMINWGE.shd) year avgmin avgwage kaitz avgcov covt mfgwage & prdef prepop prepopf prgnp prunemp usgnp t post74 & lprunemp lprgnp lusgnp lkaitz lprun_1 lprepop lprep_1 & mincov lmincov lavgmin SET MISSVALU=-999 SET SKIPMISS * Example 10.3 * Equation (10.17), p. 324. OLS lprepop lmincov lusgnp / LOGLOG * Example 10.9 * Equation (10.38), p. 338. * Generate a time trend GENR t=TIME(0) OLS lprepop lmincov lusgnp t / LOGLOG COEF=BETA STDERR=SE * Additional Note - For estimating growth rates see the command file * hseinv.sha (Example 10.7). GEN1 VA=(SE:3)**2 GEN1 g=100*(exp(BETA:3-VA/2)-1) PRINT g * Example 12.2 OLS lprepop lmincov lprgnp lusgnp t / LOGLOG RESID=U * The DIAGNOS / ACF command reports Lagrange multiplier tests * for autocorrelation -- see the discussion in the chapter * DIAGNOSTIC TESTS in the SHAZAM User's Reference Manual. DIAGNOS / ACF * On the SHAZAM output, the test statistic reported for LAG 1 in the * column LM-STAT is equivalent to the test procedure described on * p. 384 of the text. * Now show the calculation of the test statistic using SHAZAM commands. GENR U1=LAG(U) * Set zero for the initial values of the residuals. GEN1 U1:1=0 * Run the auxiliary regression OLS U lmincov lprgnp lusgnp t U1 * Obtain the test statistic reported by the DIAGNOS command GEN1 LM=SQRT($N*$R2) PRINT LM * An equivalent method is to delete the initial observations. * This is the approach used in the textbook -- see top of page 385. SAMPLE 2 38 OLS U lmincov lprgnp lusgnp t U1 * Now use the t-ratio as the test statistic. TEST U1 STOP