* Reference: Chapter 4 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. SAMPLE 1 91 READ (COLE) DEVICE YEAR FCS CAP ACT ACCT ROTD TR ARDEN PRICE & SPEED / SKIPLINES=1 READ (COLE) OLDTR OLDARD OLDPR OLDSP D72-D84 / SKIPLINES=2 NOREWIND * Exercise 4, p. 138. * (a) GENR LNPRICE=LOG(OLDPR) GENR LNSPEED=LOG(OLDSP) GENR LNCAP=LOG(CAP) OLS LNPRICE D73-D84 LNSPEED LNCAP / COEF=BETA * (c) Test the homogeneity hypothesis TEST LNSPEED+LNCAP=1 * (d) Test the null hypothesis of constant rate of price decreases. TEST TEST D73=D74/2 TEST D73=D75/3 TEST D73=D76/4 TEST D73=D77/5 TEST D73=D78/6 TEST D73=D79/7 TEST D73=D80/8 TEST D73=D81/9 TEST D73=D82/10 TEST D73=D83/11 TEST D73=D84/12 END * Create the traditional hedonic price index which is simply * the anti-log of the coefficients on the dummy variables * for each of the years (bottom of p. 122) SAMPLE 1 12 GENR H=EXP(BETA) * Now construct the chained price index. SAMPLE 1 12 GENR CH=SUM(BETA) GENR CHAIN=EXP(CH) GENR AYEAR=TIME(1972) PRINT AYEAR H CHAIN * Generate a TIME variable SAMPLE 1 91 SET NODOECHO DO #=0,12 GEN1 YR=1972+# IF (YEAR.EQ.YR) TIME=# ENDO * Estimate a model with a TIME variable OLS LNPRICE TIME LNSPEED LNCAP * Exercise 7 (b), p. 143. * Box-Cox estimation * The ALL option uses the same transformation for all variables. * The dummy variables are untransformed. BOX PRICE D73-D84 SPEED CAP / DN ALL STOP