log using state_cig_data_2.log, replace use state_cig_data * generate real taxes gen real_tax=(state_tax+federal_tax)/cpi * construct new variables * time trend gen trend=year-1981 label var trend "=1 in 1st year, 2 in second, etc" * tobacco producing state gen tob_state=(state=="NC"|state=="VA"|state=="SC"|state=="KY"|state=="MD"|state=="TN") label var tob_state "=1 if tobacco producing state" * run regression with tax and trend reg packs_pc real_tax trend * add tobacco producing state dummy reg packs_pc real_tax trend tob_state * correlation between tax and other variables reg real_tax trend tob_state * now run a model with seperate dummies * for each tobacco producing state * test two hypothesis * h1: coef are all zero * h2: coef are all equal gen nc=state=="NC" gen va=state=="VA" gen ky=state=="KY" gen md=state=="MD" gen tn=state=="TN" gen sc=state=="SC" * run unrestricted model for both hypotheses reg packs_pc real_tax trend nc va ky md tn sc * do test 1 test nc va ky md tn sc * do test 2 test nc=va=ky=md=tn=sc * do test by brute force * for h1, run restricted model * (no state effects) reg packs_pc real_tax trend * for h1, run resticted model * on dummy for all tobacco producing states reg packs_pc real_tax trend tob_state log close