* References: Chapters 4 and 6 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 506 READ (HPRICE2.shd) price crime nox rooms dist radial proptax & stratio lowstat lprice lnox lproptax * Example 4.5, p. 128. GENR ldist=LOG(dist) OLS lprice lnox ldist rooms stratio * Test the hypothesis that the coefficient on lnox is -1. * The TEST command reports p-values for 2-sided tests. TEST lnox=-1 * Example 6.1, pp. 182-183. * The SHAZAM OLS estimation output reports "beta coefficients" in * the column STANDARDIZED COEFFICIENT. OLS price nox crime rooms dist stratio * Section 6.2 * Equation (6.7), p. 183 OLS lprice lnox rooms / COEF=beta STDERR=se * Estimate the percentage impact on price for one additional room. GEN1 ra=100*(EXP(beta:2)-1) * An alternative estimate, with less bias, can be considered. * If Z is a normally distributed random variable then: * E[exp(Z)] = exp{E(Z) + Var(Z)/2} * Suppose b2 is the OLS estimate and V(b2) is the estimate of the * variance of b2. This suggests an estimate for the percentage * impact of: * 100 (exp{b2 - V(b2)/2} - 1) GEN1 r=100*(EXP(beta:2 - (se:2)*(se:2)/2)-1) PRINT ra r * Now include the student-teacher ratio in the equation OLS lprice lnox rooms stratio / COEF=beta1 STDERR=se1 * Estimate the percentage impact on price for a one unit increase in stratio. GEN1 r=100*(EXP(beta1:3 - (se1:3)*(se1:3)/2)-1) PRINT r * Now consider the effect of a five unit increase in stratio GEN1 r=100*(EXP(5*beta1:3 - 25*(se1:3)*(se1:3)/2)-1) PRINT r * Example 6.2 GENR roomsq=rooms**2 * Equation (6.14), p. 188. OLS lprice lnox ldist rooms roomsq stratio * Estimate the turning point using Equation (6.13), p. 187. TEST -rooms/(2*roomsq) * Estimate an approximate percentage impact on price for * an increase in rooms (see the discussion on p. 189). TEST 100*(rooms+2*roomsq*5) TEST 100*(rooms+2*roomsq*6) * On the TEST command the variable names represent the regression * coefficients. STOP