180 likes | 412 Views
sort state year gen ravgprs = avgprs/cpi label var ravgpr "real average price during fiscal year, including sales taxes". label. gen rtax = tax/cpi label var rtax "real average Cig specifice tax during fiscal year" gen rtaxs = taxs/cpi
E N D
sort state year • gen ravgprs = avgprs/cpi • label var ravgpr "real average price during fiscal year, including sales taxes"
gen rtax = tax/cpi • label var rtax "real average Cig specifice tax during fiscal year" • gen rtaxs = taxs/cpi • label var rtaxs "real average total tax during fiscal year,including sales taxes" • gen rtaxso = rtaxs-rtax • label var rtaxso "real average sales tax per pack during fiscal year" • gen lpackpc = log(packpc) • gen lravgprs = log(ravgprs)
Real Percapita State Income • gen perinc = income/(pop*cpi) • gen lperinc = log(perinc) encode-Encode string into numeric • encode state, gen(snum)
10-year differences • gen ltpackpc = log(packpc/packpc[_n-1]) • gen ltavgprs = log(ravgprs/ravgprs[_n-1]) • gen ltperinc = log(perinc/perinc[_n-1]) • gen dtrtaxs = rtaxs-rtaxs[_n-1] • gen dtrtax = rtax-rtax[_n-1] • gen dtrtaxso = rtaxso-rtaxso[_n-1] • keep if year==1995
OLS and IV estimation - cross section -- 1995 • reg lravgprs rtaxso, r
ivreg lpackpc (lravgprs = rtaxso) lperinc, r • ivreg lpackpc (lravgprs = rtaxso rtaxs) lperinc, r
OLS and IV estimation - Differences 1995-1985 • reg ltpackpc ltavgprs ltperinc,r
reg ltavgprs dtrtaxso ltperinc, r • test dtrtaxso
reg ltavgprs dtrtax ltperinc, r • test dtrtax
ivreg ltpackpc (ltavgprs = dtrtax dtrtaxso) ltperinc, r • predict e, resid
reg e dtrtaxso dtrtax ltperinc • drop e • qui test dtrtaxso dtrtax • dis "---- OverID stat: " r(df)*r(F) _skip(10) "p-value: " chiprob(r(df)-1,r(df)*r(F)) " -----"
reg ltavgprs dtrtax dtrtaxso ltperinc, r • test dtrtax dtrtaxso