* * CHAPTER 12 * Page 431 * open data ch12_cig.xls data(format=xls,org=columns) 1 96 year cpi pop packpc income tax avgprs taxs * * Deflate the avg price, cigarette specific tax and all taxes * set ravgprs = avgprs/cpi set rtax = tax/cpi set rtaxs = taxs/cpi * * This is the sales tax only * set rtaxso = rtaxs-rtax * * First stage regression * set lravgprs = log(ravgprs) set lpackpc = log(packpc) * * Equation 12.9 linreg(smpl=(year==1995)) lravgprs # constant rtaxso * * Get fitted values * prj phat * * Second stage regression * * Equation 12.10 linreg(smpl=(year==1995)) lpackpc # constant phat * * Direct use of 2SLS. Start by using the INSTRUMENTS instruction to set the * instrument list (here constant and rtaxso). * instruments constant rtaxso * * Then a LINREG with the INST option * * Equation 12.11 linreg(inst,smpl=(year==1995),robust) lpackpc # constant lravgprs * * Section 12.2 (pg 432) * For this section, we need the real per capita income * set perinc = income/(pop*cpi) set lperinc = log(perinc) * * Include all exogenous variables in the instruments instruction. * * Equation 12.15 instruments constant rtaxso lperinc linreg(inst,smpl=(year==1995),robust) lpackpc # constant lravgprs lperinc * * For doing 12.16, we also need the cigarette-specific taxes added to the * instrument set * * Equation 12.16 instruments constant rtaxso lperinc rtax linreg(inst,smpl=(year==1995),robust) lpackpc # constant lravgprs lperinc * * Section 12.4 (pg 445) * We need to generate the differences of the variables from the value in the same * state 10 years earlier. In this data set, that will be "lag" 48. * set ltpackpc = log(packpc/packpc{48}) set ltavgprs = log(ravgprs/ravgprs{48}) set ltperinc = log(perinc/perinc{48}) set dtrtaxs = rtaxs-rtaxs{48} set dtrtax = rtax-rtax{48} set dtrtaxso = rtaxso-rtaxso{48} * instruments constant ltperinc dtrtaxso linreg(inst,robust) ltpackpc # ltavgprs ltperinc constant * instruments constant ltperinc dtrtax linreg(inst,robust) ltpackpc # ltavgprs ltperinc constant * instruments constant ltperinc dtrtaxso dtrtax linreg(inst,robust) ltpackpc # ltavgprs ltperinc constant