/* Simple OLS regresion example Using State Tax and Per capita cigarette consumption */ use http://bigblue.depaul.edu/jlee141/econdata/eco375/state_cig_data * dscribe data desc * generate real taxes gen real_tax=(state_tax+federal_tax)/cpi * get means of real tax and per capita consumption sum packs_pc real_tax * get correlation coefficient corr packs_pc real_tax * get regression estimate reg packs_pc real_tax * plot the data with regression line tw (scatter packs_pc real_tax) (lfit packs_pc real_tax)