/* Date: April 2017 This code creates the figures for "The Intergenerational Consequences of Tobacco Policy A Review of Policy’s Influence on Maternal Smoking and Child Health" by Leah K. Lakdawala and David Simon. NOTE: Some of the data used in are available publicly some of the data used in the paper are proprietary and/or restricted access. Please see the paper for more details. */ ******************************************************************************** /*Create state-year data representing proportion of state population covered by smoking ordinances*/ /*We consider three types of 100% smoke-free provisions (by venue: non-hospitality workplaces, restaurants, and freestanding bars). Smoking ban implementation dates are referenced from data belonging to the Americans for Nonsmokers’ Rights (ANR) Foundation: “Chronological Table of U.S. Population Protected by 100% Smokefree State or Local Laws” http://www.no-smoke.org/goingsmokefree.php?id=519 Smoke-free provision dates are given at the city, county, and state-level. We aggregate these to the state-level using population data. */ /*State, county, and city/town populations are estimated by the US Census Bureau. Census Bureau intercensal estimates (recommended) 1990-2010 1990-1999: https://www.census.gov/popest/data/cities/totals/1990s/SU-99-10.html 2000-2010: https://www.census.gov/popest/data/intercensal/cities/cities2010.html Postcensal estimates 2011-2015 (intercensal unavailable) 2011-2015: https://www.census.gov/popest/data/cities/totals/2015/SUB-EST2015.html */ /*Proportion of state population covered by a ban is calculated by summing the local populations covered in a given year, and then dividing over the state population that year. In cases where ratio exceeds 1 due to implementation of a statewide ban (which overlaps with existing county/city bans), ratio is replaced with 1. ANR’s legislation data notes instances where county provisions overlap with previously implemented city provisions, and we exploit this information to prevent double counting of affected city populations. Additionally, we account for the distinction that ANR makes between county provisions that affect incorporated areas and ones that do not; the population of a county X minus incorporated places is denoted in the census data as “Balance of County X.” */ *Format state-year population data insheet using "${dir}State pop by year (US intercensal estimates).csv", clear comma names reshape long population, i(state) j(year) rename state statename gen state = "" replace state = "AL" if statename=="Alabama" replace state = "AK" if statename=="Alaska" replace state = "AS" if statename=="American Samoa" replace state = "AZ" if statename=="Arizona" replace state = "AR" if statename=="Arkansas" replace state = "CA" if statename=="California" replace state = "CO" if statename=="Colorado" replace state = "MP" if statename=="Commonwealth of Northern Mariana Islands" replace state = "CT" if statename=="Connecticut" replace state = "DE" if statename=="Delaware" replace state = "DC" if statename=="District of Columbia" replace state = "FL" if statename=="Florida" replace state = "GA" if statename=="Georgia" replace state = "GU" if statename=="Guam" replace state = "HI" if statename=="Hawaii" replace state = "ID" if statename=="Idaho" replace state = "IL" if statename=="Illinois" replace state = "IN" if statename=="Indiana" replace state = "IA" if statename=="Iowa" replace state = "KS" if statename=="Kansas" replace state = "KY" if statename=="Kentucky" replace state = "LA" if statename=="Louisiana" replace state = "ME" if statename=="Maine" replace state = "MD" if statename=="Maryland" replace state = "MA" if statename=="Massachusetts" replace state = "MI" if statename=="Michigan" replace state = "MN" if statename=="Minnesota" replace state = "MS" if statename=="Mississippi" replace state = "MO" if statename=="Missouri" replace state = "MT" if statename=="Montana" replace state = "NE" if statename=="Nebraska" replace state = "NV" if statename=="Nevada" replace state = "NH" if statename=="New Hampshire" replace state = "NJ" if statename=="New Jersey" replace state = "NM" if statename=="New Mexico" replace state = "NY" if statename=="New York" replace state = "NC" if statename=="North Carolina" replace state = "ND" if statename=="North Dakota" replace state = "OH" if statename=="Ohio" replace state = "OK" if statename=="Oklahoma" replace state = "OR" if statename=="Oregon" replace state = "PA" if statename=="Pennsylvania" replace state = "PR" if statename=="Puerto Rico" replace state = "RI" if statename=="Rhode Island" replace state = "SC" if statename=="South Carolina" replace state = "SD" if statename=="South Dakota" replace state = "TN" if statename=="Tennessee" replace state = "TX" if statename=="Texas" replace state = "VI" if statename=="U.S. Virgin Islands" replace state = "UT" if statename=="Utah" replace state = "VT" if statename=="Vermont" replace state = "VA" if statename=="Virginia" replace state = "WA" if statename=="Washington" replace state = "WV" if statename=="West Virginia" replace state = "WI" if statename=="Wisconsin" replace state = "WY" if statename=="Wyoming" order state year sort state year destring population, replace ignore(",") save "${temp}state_yr_populations.dta", replace *Collapse ANFR data to state-year level import excel "${temp}anr_census_input_to_stata.xlsx", clear sheet("Sheet1") firstrow rename *, lower reshape long pop, i(municipality state smokefreenonhospitalityw smokefreerestaurants smokefreefreestandingbars) j(year) sort state municipality year gen wkplace_ban = 0 replace wkplace_ban = 1 if year==year(smokefreenonhospitalityw) by state municipality: replace wkplace_ban = 1 if wkplace_ban[_n-1]==1 label var wkplace_ban "100% smokefree non-hospitality workplace" gen pop_wkplace_ban = 0 replace pop_wkplace_ban = pop if wkplace_ban==1 label var pop_wkplace_ban "Population 100% smokefree non-hosp workplaces" gen rest_ban = 0 replace rest_ban = 1 if year==year(smokefreerestaurants) by state municipality: replace rest_ban = 1 if rest_ban[_n-1]==1 label var rest_ban "100% smokefree restaurants" gen pop_rest_ban = 0 replace pop_rest_ban = pop if rest_ban==1 label var pop_rest_ban "Population 100% smokefree restaurants" gen bar_ban = 0 replace bar_ban = 1 if year==year(smokefreefreestandingbars) by state municipality: replace bar_ban = 1 if bar_ban[_n-1]==1 label var bar_ban "100% smokefree freestanding bars" gen pop_bar_ban = 0 replace pop_bar_ban = pop if bar_ban==1 label var pop_bar_ban "Population 100% smokefree freestanding bars" gen any_ban = 0 replace any_ban = 1 if wkplace_ban==1 | rest_ban==1 | bar_ban==1 by state municipality: replace any_ban = 1 if any_ban[_n-1]==1 label var any_ban "Any 100% smokefree ban" gen pop_any_ban = 0 replace pop_any_ban = pop if any_ban==1 label var pop_any_ban "Population with any 100% smokefree venue" save "${temp}anr_dates_w_census_pop.dta", replace *Statewide bans gen is_a_state = 0 replace is_a_state = 1 if municipality=="Alabama" & state=="AL" replace is_a_state = 1 if municipality=="Alaska" & state=="AK" replace is_a_state = 1 if municipality=="American Samoa" & state=="AS" replace is_a_state = 1 if municipality=="Arizona" & state=="AZ" replace is_a_state = 1 if municipality=="Arkansas" & state=="AR" replace is_a_state = 1 if municipality=="California" & state=="CA" replace is_a_state = 1 if municipality=="Colorado" & state=="CO" replace is_a_state = 1 if municipality=="Commonwealth of Northern Mariana Islands" & state=="MP" replace is_a_state = 1 if municipality=="Connecticut" & state=="CT" replace is_a_state = 1 if municipality=="District of Columbia" & state=="DC" replace is_a_state = 1 if municipality=="Delaware" & state=="DE" replace is_a_state = 1 if municipality=="Florida" & state=="FL" replace is_a_state = 1 if municipality=="Georgia" & state=="GA" replace is_a_state = 1 if municipality=="Guam" & state=="GU" replace is_a_state = 1 if municipality=="Hawaii" & state=="HI" replace is_a_state = 1 if municipality=="Idaho" & state=="ID" replace is_a_state = 1 if municipality=="Illinois" & state=="IL" replace is_a_state = 1 if municipality=="Indiana" & state=="IN" replace is_a_state = 1 if municipality=="Iowa" & state=="IA" replace is_a_state = 1 if municipality=="Kansas" & state=="KS" replace is_a_state = 1 if municipality=="Kentucky" & state=="KY" replace is_a_state = 1 if municipality=="Louisiana" & state=="LA" replace is_a_state = 1 if municipality=="Maine" & state=="ME" replace is_a_state = 1 if municipality=="Maryland" & state=="MD" replace is_a_state = 1 if municipality=="Massachusetts" & state=="MA" replace is_a_state = 1 if municipality=="Michigan" & state=="MI" replace is_a_state = 1 if municipality=="Minnesota" & state=="MN" replace is_a_state = 1 if municipality=="Mississippi" & state=="MS" replace is_a_state = 1 if municipality=="Missouri" & state=="MO" replace is_a_state = 1 if municipality=="Montana" & state=="MT" replace is_a_state = 1 if municipality=="Nebraska" & state=="NE" replace is_a_state = 1 if municipality=="Nevada" & state=="NV" replace is_a_state = 1 if municipality=="New Hampshire" & state=="NH" replace is_a_state = 1 if municipality=="New Jersey" & state=="NJ" replace is_a_state = 1 if municipality=="New Mexico" & state=="NM" replace is_a_state = 1 if municipality=="New York" & state=="NY" replace is_a_state = 1 if municipality=="North Carolina" & state=="NC" replace is_a_state = 1 if municipality=="North Dakota" & state=="ND" replace is_a_state = 1 if municipality=="Ohio" & state=="OH" replace is_a_state = 1 if municipality=="Oklahoma" & state=="OK" replace is_a_state = 1 if municipality=="Oregon" & state=="OR" replace is_a_state = 1 if municipality=="Pennsylvania" & state=="PA" replace is_a_state = 1 if municipality=="Puerto Rico" & state=="PR" replace is_a_state = 1 if municipality=="Rhode Island" & state=="RI" replace is_a_state = 1 if municipality=="South Carolina" & state=="SC" replace is_a_state = 1 if municipality=="South Dakota" & state=="SD" replace is_a_state = 1 if municipality=="Tennessee" & state=="TN" replace is_a_state = 1 if municipality=="Texas" & state=="TX" replace is_a_state = 1 if municipality=="U.S. Virgin Islands" & state=="VI" replace is_a_state = 1 if municipality=="Utah" & state=="UT" replace is_a_state = 1 if municipality=="Vermont" & state=="VT" replace is_a_state = 1 if municipality=="Virginia" & state=="VA" replace is_a_state = 1 if municipality=="Washington" & state=="WA" replace is_a_state = 1 if municipality=="West Virginia" & state=="WV" replace is_a_state = 1 if municipality=="Wisconsin" & state=="WI" replace is_a_state = 1 if municipality=="Wyoming" & state=="WY" gen statewide_wkplace = 1 if is_a_state==1 & wkplace_ban==1 gen statewide_rest = 1 if is_a_state==1 & rest_ban==1 gen statewide_bar = 1 if is_a_state==1 & bar_ban==1 gen statewide_any = 1 if is_a_state==1 & any_ban==1 collapse (sum) pop_wkplace_ban pop_rest_ban pop_bar_ban pop_any_ban (mean) statewide_wkplace statewide_rest statewide_bar statewide_any, by(state year) sort state year merge 1:1 state year using "${temp}state_yr_populations.dta" drop _merge gen prop_wkplace = pop_wkplace_ban / population label var prop_wkplace "Proportion of state pop under wkplace ban" gen prop_rest = pop_rest_ban / population label var prop_rest "Proportion state pop under restaurant ban" gen prop_bar = pop_bar_ban / population label var prop_bar "Proportion state pop under bar ban" gen prop_any = pop_any_ban / population label var prop_any "Proportion state pop under any ban" *Have verified that proportions exceed 1 only when a statewide ban is added to existing bans. *Have verified that proportions are at least 1 when a statewide ban is added to existing bans. replace prop_wkplace = 1 if statewide_wkplace==1 replace prop_rest = 1 if statewide_rest==1 replace prop_bar = 1 if statewide_bar==1 replace prop_any = 1 if statewide_any==1 save "${data}\state_yr_prop_smokefree.dta", replace ******************************************************************************** * collapse bans data to national level to prepare for merge use "$data\state_yr_prop_smokefree", clear *do not include data on territories /*NOTE: The ANRF also collects data on smoke-free provisions in territories. However, the Census Bureau did not as of this writing provide yearly population estimates for these territories online.*/ replace population = . if state=="AS" | state=="MP" | state=="PR" | state=="VI" | state=="GU" *create number of state population under state ban gen banpeop = population*prop_any * create national population in a year and national population under ban bysort year: egen popnat = total(population) bysort year: egen popban = total(banpeop) gen porpbannat = popban/popnat sum porpbannat collapse (mean) porpbannat, by(year) fast rename year datayear sort datayear sum save "$data\bansbyyr.dta", replace ******************************************************************************** *load vital stats data use "$data\fstmomsmk_89_09_intense.dta", clear sum anysmoke if datayear<2000 [aw=cellnum] sum anysmoke if datayear>2000 & datayear<=2009 [aw=cellnum] * first, calculate mean smoking rates (national level) for levy and meara sample time frame #delimit; preserve; collapse (mean) anysmoke lowbirth cigsperday tax09 (rawsum) cellnum2=cellnum [aw=cellnum], by(datayear); tab datayear; *merge ban data /*Note that ban data starts in 1990, whereas smoking data starts in 1989*/ merge 1:1 datayear using "$data\bansbyyr.dta"; tab _merge; sum porpbannat; drop if _merge~=3; /*Taxes and Maternal Smoking*/ *Figure 1; #delimit; graph twoway (line anysmoke datayear, c(1) yaxis(1) ytitle("% Mothers Reporting Smoking", axis(1) ) xtitle("Year") xlabel(1989(2)2009) ) (line tax09 datayear, c(1) yaxis(2) ytitle("Average Taxes, in cents (2009 dollars)", axis(2)) lp(dash)), legend(label(1 "Maternal Smoking") label(2 "Cigarette Taxes")) ; graph save "$outresults\taxes_smoking.gph", replace; /*Bans and Maternal Smoking*/ *Figure 2; #delimit; graph twoway (line anysmoke datayear, c(1) yaxis(1) ytitle("% Mothers Reporting Smoking", axis(1) ) xtitle("Year") xlabel(1989(2)2009) ) (line porpbannat datayear, c(1) yaxis(2) ytitle("% of Population Covered" "by 100% Smoke-free Air Laws", axis(2)) lp(dash)), legend(label(1 "Maternal Smoking") label(2 "Ban Coverage")) ; graph save "$outresults\bans_smoking.gph", replace; /*Maternal Smoking and LBW*/ *Figure 3a; #delimit; graph twoway (line anysmoke datayear, c(1) yaxis(1) ytitle("% Mothers Reporting Smoking", axis(1)) xtitle("Year") xlabel(1989(2)2009) ) (line lowbirth datayear, c(1) yaxis(2) ytitle("% Children Born Low Birth Weight", axis(2)) lp(dash)) , legend(label(1 "Maternal Smoking") label(2 "Low Birth Weight Status")) ; graph save "$outresults\smoking_lbw.gph", replace; restore; /*Restricted Sample: Mothers who have dropped out of highschool*/ #delimit; keep if highdrop==1; collapse (mean) anysmoke lowbirth cigsperday tax09 (rawsum) cellnum2=cellnum [aw=cellnum], by(datayear); /*Maternal Smoking and LBW - HS Dropouts*/ *Figure 3b; graph twoway (line anysmoke datayear, c(1) yaxis(1) ytitle("% Mothers Reporting Smoking, axis(1)") xtitle("Year") xlabel(1989(2)2009) ) (line lowbirth datayear, c(1) yaxis(2) ytitle("% Children Born Low Birth Weight", axis(2)) lp(dash)), legend(label(1 "Maternal Smoking") label(2 "Low Birth Weight Status")) ; graph save "$outresults\smoking_lbw_highdrop.gph", replace;