* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 2.8.2 A Quadratic Model * Data set on houses sold. SAMPLE 1 1080 READ (br.dat) / names * Use the GENR command to transform variables GENR sqftSQ=sqft**2 * Estimation (page 70) OLS price sqftSQ / COEF=b * Save the intercept estimate GEN1 b1=b:2 * Save the slope estimate GEN1 b2=b:1 * The marginal impact is the change in house price resulting from * one additional square foot. * Estimate the marginal impact for a 2000-square foot house GEN1 2*b2*2000 * Estimate the marginal impact for a 4000-square foot house GEN1 2*b2*4000 * Estimate the marginal impact for a 6000-square foot house GEN1 2*b2*6000 * Now consider the elasticity of house price with respect to house size. * Evaluate for a house with 2000 square feet. GEN1 pr = b1 + b2*2000*2000 GEN1 (2*b2*2000)*(2000/pr) * Chapter 2.8.4 A LOGLIN Model GENR lnprice=LOG(price) * Estimation (page 72) * The LOGLIN option reports elasticities at sample means assuming * the dependent variable is LOG transformed. OLS lnprice sqft / LOGLIN PREDICT=yhat * Get predicted values GENR priceHat = exp(yhat) SORT sqft priceHat GRAPH priceHat sqft / LINEONLY STOP