version 6 clear set memory 50m set more off capture log close cd c:\documents\ellison log using hedonic.log,replace use hedonic.dta *This data set contains the characteristics of *114 houses located in the town of Newton. *Because of the dispersion of observation across years, *the analysis is carried on for the period 1998-2000 *(76 observations). describe tab year_s drop if year_s<1998 sum gen lp=log(p) sum p if year_s==1998 sum p if year_s==1999 sum p if year_s==2000 sum lp if year_s==1998 sum lp if year_s==1999 sum lp if year_s==2000 tab q1 tab q2 tab style ************************* *Hedonic Price Analysis ************************* *Create year dummies and quality variables gen d98= year_s==1998 gen d99= year_s==1999 gen d00= year_s==2000 quietly tab q1,gen(q1) quietly tab q2,gen(q2) quietly tab style,gen(style) *Hedonic regression and testing (semilog specification) reg lp d99 d00 room bed bath lot size style1-style6 q11-q12 q21-q22,robust matrix C=e(b) scalar a99=C[1,1] scalar a00=C[1,2] scalar a98=C[1,21] scalar list a98 a99 a00 testparm room bed bath lot size style1-style6 q11-q12 q21-q22 testparm d99 d00 *Quality-adjusted price indeces scalar p98=1 scalar p99=exp(a99) scalar p00=exp(a00) scalar list p98 p99 p00 clear log close