* References: Chapters 4, 5 and 6 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 1388 READ (BWGHT.shd) faminc cigtax cigprice bwght fatheduc motheduc parity & male white cigs lbwght bwghtlbs packs lfaminc SET MISSVALU=-999 SET SKIPMISS SET NOWARNMISS * Example 4.9 * The ANOVA option reports the F-statistic and p-value for testing the * overall significance of the regression (see pp. 148-149). * Note that a p-value reported as 0.000 means a p-value less than * 0.0005. OLS bwght cigs parity faminc motheduc fatheduc / ANOVA * The TEST command calculates F-test statistics for joint * hypothesis tests. TEST TEST motheduc=0 TEST fatheduc=0 END * The TEST command reports p-values for test statistics * (see pp. 147-148). * Example 5.2, p. 170. * The DN option specifies that a divisor of N (instead of N-K) * will be used in the calculation of the error variance. OLS lbwght cigs lfaminc / DN STDERR=SE GEN1 N1=$N GEN1 SE1cigs=SE:1 * Now use the first half of the observations SAMPLE 1 694 OLS lbwght cigs lfaminc / DN STDERR=SE GEN1 N2=$N GEN1 SE2cigs=SE:1 * Calculate ratios GEN1 RN=SQRT(N2/N1) GEN1 RSE=SE1cigs/SE2cigs PRINT RN RSE * Section 6.1, pp. 178-180 SAMPLE 1 1388 * Estimation reported in Table 6.1, column (1) OLS bwght cigs faminc * Now measure birth weight in pounds, rather than ounces. GENR bwghtlbs=bwght/16 * Estimation reported in Table 6.1, column (2) OLS bwghtlbs cigs faminc * Now consider the number of packs of cigarettes smoked per day. GENR packs=cigs/20 * Estimation reported in Table 6.1, column (3) OLS bwght packs faminc * Question 6.1 - measure income in dollars GENR fincdol=1000*faminc OLS bwght cigs fincdol STOP