*Authors: Frank Baumgartner, Marty Davidson, Kaneesha Johnson, Arvind Krishnamurthy, Colin Wilson *Date: April 27 2017 *Project: Data visualizations for our book, Deadly Justice (Oxford University Press, 2017) *This do-file calls various data files and generates the graphs used in the book. *all graphs will be in black and white and outputted as a PNG file. *The ouptut files are labeled by the fig number, e.g.: "~/ch1_001.png" *The basic output code specifies the file type, file name, size, resolution. *This file can be used to update the graphs as well as to see the exact numbers *associated with each graph by looking in the associated data file. *It is written in Stata 13.0 and will work with any newer version of Stata. *clears out Stata's memory: clear *Set the working directory allowing you to read in the files: cd H:\DeadlyJustice-Data-and-Do-Files\ *importing the executions by method yearly data. use execs-by-method-yearly.dta tsset year, yearly tsfill *sorting by year sort year *merging files to create one time-series *this is the homicide data from 1960-2014 joinby year using homs19602014.dta, unmatched(both) save timeseries-annual.dta, replace use timeseries-annual.dta drop _merge joinby year using execs-by-year-by-group.dta, unmatched(both) drop _merge joinby year using dp-bills-by-year.dta, unmatched(both) drop _merge joinby year using execs-by-year-by-method.dta, unmatched(both) drop _merge joinby year using execs-by-method-Espy-modern-combined.dta, unmatched(both) drop _merge joinby year using execs-by-year.dta, unmatched(both) drop _merge joinby year using execs-by-method-yearly.dta, unmatched(both) drop _merge joinby year using USHoms-by-offender-victim-percents.dta, unmatched(both) drop _merge joinby year using deathpenalty-deterrence-opinion.dta, unmatched(both) drop _merge joinby year using BJS-yearly-execs.dta, unmatched(both) drop _merge joinby year using DP-opinion-and-sentences.dta, unmatched(both) drop _merge joinby year using DPOpinion-indices.dta, unmatched(both) drop _merge joinby year using overturn_finalized_rates.dta, unmatched(both) drop _merge joinby year using cumulative-execs-data-BJS.dta, unmatched(both) drop _merge save timeseries-annual.dta, replace *fig 1.1 #delimit ; twoway line total year if year>1799, lcolor(black) lwidth(medthick ) lpattern(solid ) xlabel(1800(25)2000) ylabel(, nogrid) legend(off) graphregion(color(white)) ytitle(Executions per year) xtitle(Year) title("", color(black) position(11) justification(left)) note("" ) ; graph export Fig1_1.png, replace width(1950) *fig 1.2a #delimit ; twoway line total year if year<1970 & year>1899, lcolor(black) lwidth(medthick ) lpattern(solid ) xlabel(1900(10)1970) ylabel(, nogrid) legend(off) graphregion(color(white)) ytitle(Executions per year) xtitle(Year) title("", color(black) position(11) justification(left)) note("" ) ; graph export Fig1_2a.png, replace width(1950) *fig 1.2b #delimit ; twoway line total year if year>1970, lcolor(black) lwidth(medthick ) lpattern(solid ) xlabel(1970(10)2015) ylabel(0(50)200, nogrid) legend(off) graphregion(color(white)) ytitle(Executions per year) xtitle(Year) title("", color(black) position(11) justification(left)) note("" ) ; graph export Fig1_2b.png, replace width(1950) *fig 1.3 clear use DatesOfDeathPenaltyStatuteEnactment.dta #delimit ; graph twoway line order date_dec if year<1977, lcolor(black) lwidth(medium) lpattern(solid) graphregion(color(white)) ylabel(, nogrid) yscale() xline(1972.5 , lcolor(black)) text(30 1972.5 "June 29, 1972: Furman", place(e)) ylabel() xlabel(1972(1)1976) ytitle("Number of States") xscale() xtitle("Date of Reenactment") caption("") ; graph export fig1_3.png, replace width (1950) *fig 1.4 clear import excel using CountOfStates.xlsx, firstrow gen date_dec = year+((month-1)/12)+((day-1)/365.25) sort Year2 #delimit ; graph twoway line Jurisdictions Year2 , lcolor(black) lwidth(medium) lpattern(solid) graphregion(color(white)) ylabel(, nogrid) yscale() ylabel() xlabel(1960(5)2015) ytitle("") xscale() xtitle("") ; graph export fig1_4.png, replace width (1950) *fig 3.1 clear use timeseries-annual.dta #delimit ; twoway line homs year if (year > 1959) , clcolor(black ) clpattern(solid ) clwidth(medthick) xtitle(Year) graphregion(color(white)) cmiss(n) yvarl() xlabel(1960(10)2010) ylabel(, nogrid) ytitle(Number of Homicides) subtitle(, color(black) position(11) justification(left)) ; graph export fig3_1.png, replace width(1950) *fig 3.2 clear use hom-rates-US-compared.dta gen average = (australia + austria + belgium + canada + czechrepublic + denmark + finland + france + germany + greece + hungary + iceland + netherlands + norway + poland + slovakia + slovenia + spain + sweden + switzerland + uk) / 21 #delimit ; twoway line usa average canada france uk germany year , clcolor(black black black black black black) clpattern(solid solid solid dash dot longdash) clwidth(thick medthick thin thin thin thin) xtitle(Year) graphregion(color(white)) cmiss(n) yvarl() legend(label(2 "Average") rows(2)) xlabel(2000(2)2013) ylabel(, nogrid) ytitle("Homicides per 100,000 Population") subtitle(, color(black) position(11) justification(left)) caption() ; graph export fig3_2.png, replace width(1950) *fig 3.3 clear use victim-offender-rates-by-states.dta gen aa = NOFFALL-NOFFBM-NOFFWM-NOFFWF-NOFFBF gen bb = NOFFWF+aa gen cc = NOFFBF+bb gen dd = NOFFWM+cc gen ee = NOFFBM+dd gen test = NOFFALL-ee sum test sum test if STID==0 format aa bb cc dd ee %10.0fc gen aapp = (aa*100)/NOFFALL gen bbpp = (NOFFWF*100)/NOFFALL gen ccpp = (NOFFBF*100)/NOFFALL gen ddpp = (NOFFWM*100)/NOFFALL gen eepp = (NOFFBM*100)/NOFFALL #delimit ; twoway line eepp ddpp ccpp bbpp aapp YEAR if STID==0, clcolor(black black black black black) clpattern( solid dash solid dash dash) clwidth(thick thick medium medium thin) xtitle(Year) graphregion(color(white)) cmiss(n) legend(label(5 "Other") label(4 "White Female") label(3 "Black Female")label(2 "White Male") label(1 "Black Male") rows(2)) ylabel(, nogrid) ylabel(0(10)50, nogrid) ytitle(Percent of Offenders) ; graph export fig3_3.png, replace width(1950) *fig 3.4 #delimit ; twoway line ORATEBM ORATEWM ORATEBF ORATEWF ORATEOTHRACE YEAR if STID==0, clcolor(black black black black black) clpattern( solid dash solid dash dash) clwidth(thick thick medium medium thin) xtitle(Year) caption() graphregion(color(white)) cmiss(n) legend(label(5 "Other") label(4 "White Female") label(3 "Black Female")label(2 "White Male") label(1 "Black Male") rows(2)) ylabel(, nogrid) ylabel(0(20)100, nogrid) ytitle("Offenders per 100,000 Population") ; graph export fig3_4.png, replace width(1950) *fig 3.5 clear use black-male-homicide-rates.dta #delimit ; twoway line ORATEAGE3 ORATEAGE4 ORATEAGE2 ORATEAGE5 ORATEAGE6 ORATEAGE7 ORATEAGE1 YEAR if STID==0, clcolor(black black black black black black black ) clpattern(solid dash dot solid dash dot solid dash) clwidth(thick thick thick medium medium medium thin thin) xtitle(Year) graphregion(color(white)) cmiss(n) yvarl("18-24" "25-34" "14-17" "35-49" "50-64" "65+" "<14") legend(rows(2)) ytitle("Offenders per 100,000 Population") ylabel(, nogrid) ; graph export fig3_5.png, replace width(1950) *fig 3.6 clear use victim-offender-rates-by-states.dta gen aa = NVICALL-NVICBM-NVICWM-NVICWF-NVICBF gen bb = NVICWF+aa gen cc = NVICBF+bb gen dd = NVICWM+cc gen ee = NVICBM+dd gen test = NVICALL-ee sum test sum test if STID==0 gen aapp = (aa*100)/NVICALL gen bbpp = (NVICWF*100)/NVICALL gen ccpp = (NVICBF*100)/NVICALL gen ddpp = (NVICWM*100)/NVICALL gen eepp = (NVICBM*100)/NVICALL sum aapp bbpp ccpp ddpp eepp if STID==0 sum aapp bbpp ccpp ddpp eepp if YEAR==1999 & STID==0 #delimit ; twoway line eepp ddpp ccpp bbpp aapp YEAR if STID==0, clcolor(black black black black black) clpattern( solid dash solid dash dash) clwidth(thick thick medium medium thin) xtitle(Year) graphregion(color(white)) cmiss(n) legend(label(5 "Other") label(4 "White Female") label(3 "Black Female")label(2 "White Male") label(1 "Black Male") rows(2)) ylabel(, nogrid) ylabel(0(10)50, nogrid) ytitle(Percent of Victims) ; graph export fig3_6.png, replace width(1950) *fig 3.7 #delimit ; twoway line VRATEBM VRATEWM VRATEBF VRATEWF VRATEOTHRACE YEAR if STID==0, clcolor(black black black black black) clpattern( solid dash solid dash dash) clwidth(thick thick medium medium thin) xtitle(Year) graphregion(color(white)) cmiss(n) legend(label(5 "Other") label(4 "White Female") label(3 "Black Female")label(2 "White Male") label(1 "Black Male") rows(2)) ylabel(, nogrid) ylabel(0(10)70, nogrid) ytitle("Victims per 100,000 Population") ; graph export fig3_7.png, replace width(1950) *fig 3.8 clear use black-male-homicide-rates.dta #delimit ; twoway line VRATEAGE3 VRATEAGE4 VRATEAGE2 VRATEAGE5 VRATEAGE6 VRATEAGE7 VRATEAGE1 YEAR if STID==0, clcolor(black black black black black black black ) clpattern(solid dash dot solid dash dot solid dash) clwidth(thick thick thick medium medium medium thin thin) xtitle(Year) graphregion(color(white)) cmiss(n) yvarl("18-24" "25-34" "14-17" "35-49" "50-64" "65+" "<14") ylabel(, nogrid) legend(rows(2)) ytitle("Victims per 100,000 Population") ; graph export fig3_8.png, replace width(1950) *fig 3.9 clear import excel using homiciderates_by_gender_race.xlsx, first drop if year<1998 drop wmother wfother bmother bfother *white males offender 3.9a #delimit ; graph bar wmwm wmwf wmbm wmbf, over(year, label(angle(90))) stack graphregion(color(white)) line(lwidth(thin) lcolor(gs0)) lintensity(255) ylabel(, nogrid) yscale() bar(1, color(gs16) lcolor(gs0) lwidth(thin)) bar(2, color(gs8) lcolor(gs0) lwidth(thin)) bar(3, color(gs4) lcolor(gs0) lwidth(thin)) bar(4, color(gs0) lcolor(gs0) lwidth(thin)) ytitle("Percent of Victims") xscale() xlabel() legend(label(1 "White Male") label(2 "White Female") label(3 "Black Male") label(4 "Black Female") label(5 "Other" ) row(2)) title("White Male Offenders" , color(black) position(11) justification(left)) caption("") ; graph export fig3_9a.png, replace width(1950) *white female offender 3.9b #delimit ; graph bar wfwm wfwf wfmb wfbf, over(year, label(angle(90))) stack graphregion(color(white)) ylabel(, nogrid) yscale() bar(1, color(gs16) lcolor(gs0) lwidth(thin)) bar(2, color(gs8) lcolor(gs0) lwidth(thin)) bar(3, color(gs4) lcolor(gs0) lwidth(thin)) bar(4, color(gs0) lcolor(gs0) lwidth(thin)) ytitle("Percent of Victims") xscale() xlabel() legend(label(1 "White Male") label(2 "White Female") label(3 "Black Male") label(4 "Black Female") label(5 "Other" ) row(2)) title("White Female Offenders" , color(black) position(11) justification(left)) caption("") ; graph export fig3_9b.png, replace width(1950) *black male offender 3.9c #delimit ; graph bar bmwm bmwf bmbm bmbf, over(year, label(angle(90))) stack graphregion(color(white)) ylabel(, nogrid) yscale() bar(1, color(gs16) lcolor(gs0) lwidth(thin)) bar(2, color(gs8) lcolor(gs0) lwidth(thin)) bar(3, color(gs4) lcolor(gs0) lwidth(thin)) bar(4, color(gs0) lcolor(gs0) lwidth(thin)) ytitle("Percent of Victims") xscale() xlabel() legend(label(1 "White Male") label(2 "White Female") label(3 "Black Male") label(4 "Black Female") label(5 "Other" ) row(2)) title("Black Male Offenders" , color(black) position(11) justification(left)) caption("") ; graph export fig3_9c.png, replace width(1950) *black female offender 3.9d #delimit ; graph bar bfwm bfwf bfbm bfbf, over(year, label(angle(90))) stack graphregion(color(white)) ylabel(, nogrid) yscale() bar(1, color(gs16) lcolor(gs0) lwidth(thin)) bar(2, color(gs8) lcolor(gs0) lwidth(thin)) bar(3, color(gs4) lcolor(gs0) lwidth(thin)) bar(4, color(gs0) lcolor(gs0) lwidth(thin)) ytitle("Percent of Victims") xscale() xlabel() legend(label(1 "White Male") label(2 "White Female") label(3 "Black Male") label(4 "Black Female") label(5 "Other" ) row(2)) title("Black Female Offenders" , color(black) position(11) justification(left)) caption("") ; graph export fig3_9d.png, replace width(1950) *fig 3.10 and 3.11 *made using GIS/mapping software, not through STATA *fig 4.1 clear import excel using US-homs-execs.xlsx, sheet("totals") firstrow #delimit ; graph bar blackvictims whitevictims, over(exec, relabel(1 "All Homicides" 2 "Execution Cases" )) sort(exec) percent stack graphregion(color(white)) bar(1, color(gs2)) bar(2, color(gs10)) ytitle(Percent) blabel(bar, format(%5.1fc) position(center) color(white) size(medium)) ylabel(, nogrid) legend(order(1 "Black" 2 "White") row(1)) note() ; graph export fig4_1.png, width(1950) replace *fig 4.2 #delimit ; graph bar malevictims femalevictims , over(exec, relabel(1 "All Homicides" 2 "Execution Cases" )) sort(exec) percent stack graphregion(color(white)) bar(1, color(gs2)) bar(2, color(gs10)) ytitle(Percent) blabel(bar, format(%5.1fc) position(center) color(white) size(medium)) ylabel(, nogrid) legend(order(1 "Male" 2 "Female")) note() ; graph export fig4_2.png, width(1950) replace *fig 4.3 clear import excel using US-homs-execs.xlsx, sheet("ratios") firstrow gen bmr = (bme*100)/bmh gen bfr = (bfe*100)/bfh gen wmr = (wme*100)/wmh gen wfr = (wfe*100)/wfh drop if me==. #delimit; graph bar (asis) bmr bfr wmr wfr if st=="US", legend(order(1 "Black Male" 2 "Black Female" 3 "White Male" 4 "White Female")) ytitle("Executions as a Percent of Homicides", size(small)) lintensity(255) bar(4, color(gs16) lcolor(gs0) lwidth(thin)) bar(3, color(gs13) lcolor(gs0) lwidth(thin)) bar(2, color(gs3) lcolor(gs0) lwidth(thin)) bar(1, color(gs0) lcolor(gs0) lwidth(thin)) blabel(bar, position(above) format(%5.2f) color(black)) bargap(25) yline() graphregion(color(white)) ylabel(, nogrid) note("", size(vsmall)) ; graph export Fig4_3.png, width(1950) replace *fig 6.1 clear use execs-by-state.dta #delimit ; graph hbar execs , over(state, label(alt labsize(vsmall) ) sort(execs) ) graphregion(color(white)) aspectratio() bar(1, color(black)) blabel(total , size(vsmall)) ylabel(, nogrid) ytitle(Number of Executions) note("", span) ysize(8) xsize(6.5) ; graph export fig6_1.png, replace width(1950) *fig 6.2 clear use county-frequency-by-exec-county.dta #delimit ; scatter inv_cum_freq execcount if (execcount>0), mlstyle(color(gs0)) msymbol(circle) mfcolor(black) graphregion(color(white)) ylabel(, nogrid) yscale() ylabel() ytitle("Number of Counties") xscale() xlabel(0(25)125) xtitle("Number of Executions") caption() ; graph export fig6_2.png, replace width(1950) *fig 6.3 clear use execs-and-homs-by-county.dta #delimit ; graph hbar execcount if (execcount>9), over(countystate, label(angle()) sort(execcount) ) graphregion(color(white)) blabel(bar) bar(1, color(black)) aspectratio() yscale() ylabel(0(25)125, nogrid) ytitle(Number of Executions) note() ; graph export fig6_3.png, replace width(1950) *fig 6.4A #delimit ; graph hbar execcount if state == "TX" & execcount > 4, over(county, label(angle()) sort(execcount) ) graphregion(color(white)) blabel(bar) subtitle("Texas Counties with the Highest Number of Executions") bar(1, color(black)) aspectratio() yscale() ylabel(0(10)130, nogrid) ytitle(Number of Executions) note() ; graph export fig6_4a.png, replace width(1950) *fig 6.4b #delimit ; graph hbar execcount if state == "OK" & execcount > 0, over(county, label(angle() labsize(small)) sort(execcount) ) graphregion(color(white)) blabel(bar) subtitle("Oklahoma Counties with Executions") bar(1, color(black)) aspectratio() yscale() ylabel(0(5)40, nogrid) ytitle(Number of Executions) note() ; graph export fig6_4b.png, replace width(1950) *fig 6.5a clear use hom-execs-by-state.dta #delimit ; scatter execs hom , mcolor(black) mlab(stateabb) mlabcolor(black) m(i) xtitle("Homicides, 1984 through 2012") ylabel(, nogrid) ytitle("Executions, 1976 through 2015") graphregion(color(white)) title(Homicides and Executions, color(black)) caption() ; graph export fig6_5a.png, replace width(1950) corr execrate homrate *fig 6.5b #delimit ; scatter execrate homrate, mcolor(black) mlab(stateabb) mlabcolor(black) m(i) xtitle("Homicides per 1,000 population") ylabel(, nogrid) ytitle("Executions per 100 homicides") graphregion(color(white)) title(Homicide and Execution Rates, color(black)) caption() ; graph export fig6_5b.png, replace width(1950) *fig 6.6 *fig generated using mapping in R *fig 6.7 clear use state-freqs-execcount.dta gen execcount1 = execcount+1 gen lfreq = ln(inv_cum_freq) gen lexeccount =ln(execcount+1) reg lexeccount lfreq predict plexeccount gen predexeccount = exp(plexeccount) #delimit ; scatter inv_cum_freq execcount1 , mlstyle(color(gs0)) msymbol(circle) mfcolor(black) || scatter inv_cum_freq predexeccount , mlstyle(color(gs0)) connect(line) ms(i) lcolor(black) lwidth(thick) graphregion(color(white)) ylabel(, nogrid) legend(off) yscale(log) ylabel(1 5 10 20 40 80) ytitle("Number of States") xscale(log) xlabel(1 "0" 3 "2" 6 "5" 11 "10" 21 "20" 41 "40" 81 "80" 161 "160" 321 "320" 501 "500") xtitle("Number of Executions") caption("") ; graph export fig6_7.png, replace width(1950) *fig 6.8 clear use county-frequency-by-exec-county.dta gen execcount1 = execcount+1 gen lfreq = ln(inv_cum_freq) gen lexeccount =ln(execcount+1) reg lexeccount lfreq predict plexeccount gen predexeccount = exp(plexeccount) #delimit ; scatter inv_cum_freq execcount1 , mlstyle(color(gs0)) msymbol(circle) mfcolor(black) || scatter inv_cum_freq predexeccount , mlstyle(color(gs0)) connect(line) ms(i) lcolor(black) lwidth(thick) graphregion(color(white)) ylabel(, nogrid) legend(off) yscale(log) ylabel(1 5 10 20 40 80 500 3000) ytitle("Number of Counties") xscale(log) xlabel(1 "0" 3 "2" 6 "5" 11 "10" 21 "20" 41 "40" 81 "80" 161 "160") xtitle("Number of Executions") caption() ; graph export fig6_8.png, replace width(1950) *fig 6.9a clear use execs-and-homs-by-county.dta keep if state == "TX" sum execcount, d sum execcount if execcount>0, d sort execcount contract execcount rename _freq freq cumul execcount, gen(newid) freq cumul execcount [fweight=freq], gen(cum_freq) freq egen max_freq=max(cum_freq) gen inv_max_freq=(max_freq)-cum_freq gen prevval=inv_max_freq[_n-1] *Next line, you need to insert the proper total number of counties recode prevval (.=161) drop cum_freq max_freq inv_max_freq rename prevval inv_cum_freq gen execcount1 = execcount+1 gen lfreq = ln(inv_cum_freq) gen lexeccount =ln(execcount+1) reg lexeccount lfreq predict plexeccount gen predexeccount = exp(plexeccount) *Read the regression output on the screen and this determines the values in the caption. #delimit ; scatter inv_cum_freq execcount1 , mlstyle(color(gs0)) msymbol(circle) mfcolor(black) || scatter inv_cum_freq predexeccount , mlstyle(color(gs0)) connect(line) ms(i) lcolor(black) lwidth(thick) graphregion(color(white)) ylabel(, nogrid) legend(off) yscale(log) ylabel(1 3 10 25 100) ytitle("Number of Counties") xscale(log) xlabel(1 "0" 2 "1" 3 "2" 6 "5" 11 "10" 26 "25" 51 "50" 71 "70" 126 "125") xtitle("Number of Executions") title("A Power Law of Death - Texas", color(black) position(11) justification(left)) caption("") ; graph export fig6_9a.png, replace width(1950) *fig 6.9b clear use execs-and-homs-by-county.dta keep if state == "OK" sum execcount, d sum execcount if execcount>0, d sort execcount contract execcount rename _freq freq cumul execcount, gen(newid) freq cumul execcount [fweight=freq], gen(cum_freq) freq egen max_freq=max(cum_freq) gen inv_max_freq=(max_freq)-cum_freq gen prevval=inv_max_freq[_n-1] *Next line, you need to insert the proper total number of counties recode prevval (.=77) drop cum_freq max_freq inv_max_freq rename prevval inv_cum_freq gen execcount1 = execcount+1 gen lfreq = ln(inv_cum_freq) gen lexeccount =ln(execcount+1) reg lexeccount lfreq predict plexeccount gen predexeccount = exp(plexeccount) *Read the regression output on the screen and this determines the values in the caption. #delimit ; scatter inv_cum_freq execcount1 , mlstyle(color(gs0)) msymbol(circle) mfcolor(black) || scatter inv_cum_freq predexeccount , mlstyle(color(gs0)) connect(line) ms(i) lcolor(black) lwidth(thick) graphregion(color(white)) ylabel(, nogrid) legend(off) yscale(log) ylabel(1 3 10 25 50) ytitle("Number of Counties") xscale(log) xlabel(1 "0" 2 "1" 3 "2" 6 "5" 11 "10" 26 "25" 51 "50") xtitle("Number of Executions") title("A Power Law of Death - Oklahoma", color(black) position(11) justification(left)) caption("") ; graph export fig6_9b.png, replace width(1950) *fig 7.1 clear use timeseries-annual.dta #delimit ; twoway line PercFinalized year if year > 1973 , clcolor(black ) clpattern(solid ) clwidth(medthick ) xtitle(Year of Death Sentence) xlabel(1973(5)2013) caption() graphregion(color(white)) cmiss(n) yvarl() ylabel(, nogrid) ytitle(Percent Finalized) ; graph export fig7_1.png, replace width(1950) *fig 7.2a format CumExec CumFinalized CumSentenced %6.0fc #delimit; twoway line CumExec CumFinalized year if year > 1973, lcolor(black black) lpattern(solid dash ) lwidth(medthick medthick ) xtitle(Year of Death Sentence) xlabel(1973(10)2013) graphregion(color(white)) ylabel(, nogrid) legend(label(1 "Executions") label(2 "Finalized Death Sentences") rows(1)) ytitle(Cumulative Frequency) ; graph export fig7_2a.png, replace width(1950) *fig 7.2b #delimit; twoway line CumExec CumSentenced year if year > 1973, lcolor(black black) lpattern(solid dash ) lwidth(medthick medthick ) xtitle(Year of Death Sentence) xlabel(1973(10)2013) graphregion(color(white)) ylabel(, nogrid) legend(label(1 "Executions") label(2 "Death Sentences") rows(1)) ytitle(Cumulative Frequency) ; graph export fig7_2b.png, replace width(1950) *fig 7.3 #delimit ; twoway line PercOverturned year if year > 1972 & year < 2003, lcolor(black ) lpattern(solid ) lwidth(medthick ) xtitle(Year of Death Sentence) xlabel(1973(5)2003) caption() graphregion(color(white)) cmiss(n) yvarl() ylabel(, nogrid) ytitle(Percent Overturned) ; graph export fig7_3.png, replace width(1950) *fig 7.4 #delimit; twoway line CumStatute CumConviction CumSentenceOverturned CumCommute year if year > 1972, lcolor(black black black black ) lpattern(solid dash dot longdash ) lwidth(medthick medthick medthick medthick ) xtitle(Year of Death Sentence) xlabel(1976(6)2013) caption() graphregion(color(white)) ylabel(, nogrid) legend(label(1 "Statute Overturned") label(2 "Conviction Overturned") label(3 "Sentence Overturned") label(4 "Commutations") rows(2)) ytitle(Cumulative Frequency) ; graph export fig7_4.png, replace width(1950) *fig 7.5 clear import excel BJSTable17-2013.xlsx, firstrow gen Reversals=Overturned+Commuted+OtherRemoval gen perc_overturn=Reversals/Sentenced*100 #delimit; graph bar Reversals DeathRow Death Executed if Executed>19, over(St, sort(perc_overturn) descending) percent stack graphregion(color(white)) bar(1, color(gs0)) bar(2, color(gs8)) bar(3, color(gs12)) bar(4, color(gs15)) ytitle("Percent") legend(label(1 "Reversals") label(2 "Still on Death Row") label(3 "Non-Execution Death") label(4 "Executed") rows(2)) ylabel(, nogrid) note("") ; graph export fig7_5.png, replace width(1950) *fig 7.6 #delimit; graph bar Reversals DeathRow Death Executed if Executed<20 & Sentenced>39, over(St, sort(perc_overturn) descending) percent stack graphregion(color(white)) bar(1, color(gs0)) bar(2, color(gs8)) bar(3, color(gs12)) bar(4, color(gs15)) ytitle("Percent") legend(label(1 "Reversals") label(2 "Still on Death Row") label(3 "Non-Execution Death") label(4 "Executed") rows(2)) ylabel(, nogrid) note() ; graph export fig7_6.png, replace width(1950) *fig 8.1 clear ssc install estout ssc install mylabels import excel using CarolinaExecutionDatabase2015.xlsx, first gen executiondate = mdy(execm,execd,execy) format executiondate %td gen crimedate = mdy(crimem,crimed,crimey) format crimedate %td gen sentdate = mdy(sentm,sentd,senty) format sentdate %td ************ gen elapseyCS = sentdate - crimedate format elapseyCS %td gen elapseySE = executiondate - sentdate format elapseySE %td gen elapseyCE = executiondate - crimedate format elapseyCE %td save CarolinaExecutionDatabase2015_2.dta, replace ******************************************************************************** ******************************************************************************** use CarolinaExecutionDatabase2015_2.dta, clear replace elapseyCS = elapseyCS/365.25 format elapseyCS %9.0f replace elapseySE = elapseySE/365.25 format elapseySE %9.0f replace elapseyCE = elapseyCE/365.25 format elapseyCE %9.0f label variable executiondate "Date of Execution" label variable execy "Year of Execution" *Predicted Values (Executiondate) reg elapseyCS executiondate predict CS reg elapseySE executiondate predict SE reg elapseyCE executiondate estimates store CE predict CE *Stored Estimates (Execution Year) reg elapseyCS execy estimates store CS reg elapseySE execy estimates store SE *Get estimates of days of delay per year for the text gen elapsedCS = elapseyCS*365.25 gen elapsedSE = elapseySE*365.25 gen elapsedCE = elapseyCE*365.25 reg elapsedCS execy reg elapsedSE execy reg elapsedCE execy mylabels 1975(5)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseyCE executiondate, mcolor(black) msize(vsmall)) /// (line CE executiondate, lpattern(solid) lcolor(black)), /// graphregion(color(white)) legend(off) /// ylabel(, nogrid) xlabel(`execution') /// ytitle("Years Elapsed (Crime to Execution)") xtitle("") graph export fig8_1.png, replace width(1950) *fig 8.2 label define volunteer 0 "Non-Volunteer" 1 "Volunteer" label value volunteer volunteer *Predicted Values (Executiondate) reg elapseySE c.executiondate##volunteer predict VolA if volunteer==1 predict NonVolA if volunteer==0 reg elapseySE c.executiondate predict Every *Stored Estimates (Execution Year) reg elapseySE c.execy##volunteer estimates store elapseySE gen elapseyCEV = elapseyCE if volunteer==1 gen elapseyCENV = elapseyCE if volunteer==0 mylabels 1975(5)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseyCEV executiondate, mcolor(black) msize(vsmall)) /// (scatter elapseyCENV executiondate, mcolor(gs12) msize(vsmall)), /// graphregion(color(white)) legend(label(1 "Volunteers") label(2 "Non-Volunteers")) /// ylabel(, nogrid) xlabel(`execution') /// ytitle("Years Elapsed (Crime to Execution)") xtitle("") graph export fig8_2.png, replace width(1950) *fig 8.3a mylabels 1975(5)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseyCS executiondate, mcolor(black) msize(vsmall)) /// (line CS executiondate, lpattern(dash) lcolor(black)), /// graphregion(color(white)) legend(off) /// ylabel(, nogrid) xlabel(`execution') /// ytitle("Years Elapsed (Crime to Sentencing)") xtitle("") graph export fig8_3a.png, replace width(1950) *fig 8.3b mylabels 1975(5)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate, mcolor(black) msize(vsmall)) /// (line SE executiondate, lpattern(dash) lcolor(black)), /// graphregion(color(white)) legend(off) /// ylabel(, nogrid) xlabel(`execution') /// ytitle("Years Elapsed (Sentencing to Execution)") xtitle("") graph export fig8_3b.png, replace width(1950) *figure 8.4 clear use CarolinaExecutionDatabase2015_2.dta, clear replace elapseyCS = elapseyCS/365.25 format elapseyCS %9.0f replace elapseySE = elapseySE/365.25 format elapseySE %9.0f replace elapseyCE = elapseyCE/365.25 format elapseyCE %9.0f gen numbercases = 1 collapse (mean) elapseyCE elapseyCS elapseySE (sum) numbercases, by(execy) {/*Expanding Observations*/ expand 2 if execy < 1992 gen newobs = 0 forvalues i = 38/50 { replace newobs = 1 in `i' } forvalues i = 38/50 { replace execy = execy - 11 in `i' } forvalues i = 38/50 { replace elapseyCE = . in `i' } forvalues i = 38/50 { replace elapseyCS = . in `i' } forvalues i = 38/50 { replace elapseySE = . in `i' } forvalues i = 38/50 { replace numbercases = . in `i' } drop if execy>2000 & newobs==1 duplicates drop drop if execy==1977 & newobs==1 drop if execy==1979 & newobs==1 tsset execy tsfill gen number_deathrow = 0 replace number_deathrow = 517 if execy == 1968 replace number_deathrow = 575 if execy == 1969 replace number_deathrow = 631 if execy == 1970 replace number_deathrow = 642 if execy == 1971 replace number_deathrow = 334 if execy == 1972 replace number_deathrow = 134 if execy == 1973 replace number_deathrow = 244 if execy == 1974 replace number_deathrow = 488 if execy == 1975 replace number_deathrow = 420 if execy == 1976 replace number_deathrow = 423 if execy == 1977 replace number_deathrow = 482 if execy == 1978 replace number_deathrow = 539 if execy == 1979 replace number_deathrow = 691 if execy == 1980 replace number_deathrow = 856 if execy == 1981 replace number_deathrow = 1050 if execy == 1982 replace number_deathrow = 1209 if execy == 1983 replace number_deathrow = 1405 if execy == 1984 replace number_deathrow = 1591 if execy == 1985 replace number_deathrow = 1781 if execy == 1986 replace number_deathrow = 1984 if execy == 1987 replace number_deathrow = 2124 if execy == 1988 replace number_deathrow = 2250 if execy == 1989 replace number_deathrow = 2356 if execy == 1990 replace number_deathrow = 2482 if execy == 1991 replace number_deathrow = 2575 if execy == 1992 replace number_deathrow = 2716 if execy == 1993 replace number_deathrow = 2890 if execy == 1994 replace number_deathrow = 3054 if execy == 1995 replace number_deathrow = 3219 if execy == 1996 replace number_deathrow = 3335 if execy == 1997 replace number_deathrow = 3452 if execy == 1998 replace number_deathrow = 3527 if execy == 1999 replace number_deathrow = 3593 if execy == 2000 replace number_deathrow = 3581 if execy == 2001 replace number_deathrow = 3557 if execy == 2002 replace number_deathrow = 3374 if execy == 2003 replace number_deathrow = 3315 if execy == 2004 replace number_deathrow = 3254 if execy == 2005 replace number_deathrow = 3228 if execy == 2006 replace number_deathrow = 3215 if execy == 2007 replace number_deathrow = 3207 if execy == 2008 replace number_deathrow = 3173 if execy == 2009 replace number_deathrow = 3158 if execy == 2010 replace number_deathrow = 3082 if execy == 2011 replace number_deathrow = 3033 if execy == 2012 replace number_deathrow = 2979 if execy == 2013 replace number_deathrow = 3054 if execy == 2014 replace number_deathrow = 2959 if execy == 2015 replace number_deathrow = 2943 if execy == 2016 } * rename execy Year merge 1:1 Year using "BJS_ElapsedTime_OnDR_77to13.dta" replace ElapsedTime = ElapsedTime/12 foreach x in elapseyCE elapseyCS elapseySE { replace `x' = . if Year<=1983 } * gen max = 4000 gen min = 1400 foreach x in max min { replace `x' = . if Year<2000 } format number_deathrow %6.0fc #delimit ; twoway (line number_deathrow Year if Year>1975, yaxis(1) yscale(range(0(1000)4000) axis(1)) lcolor(black) lpattern(dash)) (line elapseyCE Year if Year>1975, yaxis(2) yscale(range(0(5)20) axis(2)) lcolor(black) lpattern(solid)) , graphregion(color(white)) ytitle("Average Years from Crime to Execution", axis(2)) ytitle("Death Row Population", axis(1)) legend(label(2 "Years Elapsed") label(1 "Death Row Population") order(1 2 ) rows(1)) xscale(range(1975(10)2015)) xtitle(Year) ylabel(, nogrid) ; graph export "fig8_4.png", width(1950) replace *figure 8.5 use CarolinaExecutionDatabase2015_2.dta, clear replace elapseyCS = elapseyCS/365.25 format elapseyCS %9.0f replace elapseySE = elapseySE/365.25 format elapseySE %9.0f replace elapseyCE = elapseyCE/365.25 format elapseyCE %9.0f replace st = "OH" if st =="Oh" gen numbercases = 1 keep if st == "VA" | st=="TX" | st=="OK" | st=="FL" | st=="GA" | st=="AL" | st=="OH" | st=="MO" label variable executiondate "Date of Execution" label variable execy "Execution Year" ********** reg elapseySE executiondate if st=="FL" predict FL reg elapseySE executiondate if st=="VA" predict VA reg elapseySE executiondate if st=="TX" predict TX reg elapseySE executiondate if st=="OK" predict OK reg elapseySE executiondate if st=="GA" predict GA reg elapseySE executiondate if st=="AL" predict AL reg elapseySE executiondate if st=="OH" predict OH reg elapseySE executiondate if st=="MO" predict MO ********** mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="FL", msymbol(circle) mcolor(black) msize(vsmall)) /// (line FL executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle(Number of Years) /// legend(off) subtitle(Florida, justification(left)) ylabel(, nogrid) graph save fig8-FL.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="VA", msymbol(circle) mcolor(black) msize(vsmall)) /// (line VA executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Virginia) ylabel(, nogrid) graph save fig8-VA.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="TX", msymbol(circle) mcolor(black) msize(vsmall)) /// (line TX executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Texas) ylabel(, nogrid) graph save fig8-TX.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="OK", msymbol(circle) mcolor(black) msize(vsmall)) /// (line OK executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Oklahoma) ylabel(, nogrid) graph save fig8-OK.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="GA", msymbol(circle) mcolor(black) msize(vsmall)) /// (line OK executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Georgia) ylabel(, nogrid) graph save fig8-GA.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="AL", msymbol(circle) mcolor(black) msize(vsmall)) /// (line OK executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Alabama) ylabel(, nogrid) graph save fig8-AL.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="OH", msymbol(circle) mcolor(black) msize(vsmall)) /// (line OK executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Ohio) ylabel(, nogrid) graph save fig8-OH.gph, replace mylabels 1975(10)2015, myscale(dofy(@)) local(execution) twoway (scatter elapseySE executiondate if st=="MO", msymbol(circle) mcolor(black) msize(vsmall)) /// (line OK executiondate, lpattern(solid) lcolor(black)), /// yscale(range(0 25)) xlabel(`execution') graphregion(color(white)) xtitle("") ytitle("") /// legend(off) subtitle(Missouri) ylabel(, nogrid) graph save fig8-MO.gph, replace graph combine fig8-OH.gph fig8-GA.gph fig8-MO.gph fig8-TX.gph fig8-FL.gph fig8-AL.gph fig8-OK.gph fig8-VA.gph, graphregion(color(white)) colf r(3) col(2) xsize(6.4) ysize(8.8) ycommon graph export "fig8_5.png", width(1950) replace *figure 9.1 import excel "NationalRegistryExonerationsDatabase", sheet("owssvr") firstrow clear gen exoneree=1 gen deathexonerations=. replace deathexonerations=1 if (Sentence == "Death") *changing year exonerated to a numeric variable from string variable destring Exonerated, generate(YearExonerated) *collapsing death and all exonerations over year exonerated collapse (sum) deathexonerations exoneree, by(YearExonerated) *setting timeseries-annual tsset YearExonerated drop if YearExonerated == 2016 *line graph comparing death vs all exonerations #delimit; line exoneree deathexonerations YearExonerated, lcolor(black gray) graphregion(color(white)) ylabel(, nogrid) xlabel(1990(5)2015) legend(label(1 "All Exonerations") label(2 "Death Exonerations")) note("", size(vsmall)) ytitle("Exonerations", size (small)) xtitle("Year", size (small)) ; graph export fig9_1.png, replace width(1950) *figure 9.2 clear import excel "NationalRegistryExonerationsDatabase", sheet("death-exonerations") firstrow clear gen exoneree=1 collapse (sum) exoneree, by (YearofE) drop if YearofE ==. #delimit ; twoway bar exoneree YearofE, barwidth(.5) color(black) graphregion(color(white)) aspectratio() xlabel(1970(5)2015) xtitle(Year of Exoneration) ylabel(, nogrid) ytitle(Number of Exonerees) note() ; graph export fig9_2.png, replace width(1950) *figure 9.3 clear import excel "NationalRegistryExonerationsDatabase", sheet("death-exonerations") firstrow clear #delimit; twoway scatter YearsonDR YearofE, msymbol(circle) mcolor(black) msize(vsmall) graphregion(color(white)) ylabel(,nogrid) xlabel(1970(5)2015) yscale(range(0 40)) xtitle("Year of Exoneration") ytitle("Years Between Conviction and Exoneration" ) ; graph export fig9_3.png, replace width(1950) *figure 9.4 gen exoneree=1 #delimit ; graph bar (sum) exoneree, over(State, label(angle(0) labsize(vsmall))sort((sum)exoneree) ) blabel(bar, size(tiny)) graphregion(color(white)) bar(1, color(black)) aspectratio() ylabel(, nogrid) ytitle(Number of Exonerees) note() ; graph export fig9_4.png, replace width(1950) *figure10.1 clear use timeseries-annual.dta #delimit ; twoway scatter hanging electrocution gaschamber injection year , connect(l l l l) cmissing(n n n n) lcolor(black black black black ) lwidth(thin thin medium medthick ) lpattern(solid solid solid solid ) msymbol(i O i O) mcolor( black black black black) msize ( medium vsmall small small ) xlabel(1600(50)2015) ylabel(, nogrid) legend(label(1 "Hanging") label(2 "Electrocution") label(3 "Gas") label(4 "Injection") row(1)) graphregion(color(white)) ytitle(Executions per year) xtitle(Year) note() ; graph export fig10_1.png, replace width(1950) *figure 10.2 #delimit ; twoway line hanging electrocution gaschamber injection year if year > 1899 , lcolor(black black black black ) lwidth(thin medthick medium thick) lpattern(solid solid dash solid ) xlabel(1900(25)2015) legend(label(1 "Hanging") label(2 "Electrocution") label(3 "Gas") label(4 "Injection") row(1)) graphregion(color(white)) ytitle(Executions per year) xtitle(Year) ylabel(, nogrid) note( ) ; graph export fig10_2.png, replace width(1950) *figure 10.3a use "Lynchings_by_state.dta", clear joinby race state using "epsy_by_state_1877_1972.dta", unmatched(both) keep if _merge==3 drop _merge corr Lynchings Executions if race=="Black" & Lynchings>15 & Executions>15 twoway (scatter Lynchings Executions if race=="Black" & Lynchings>15 & Executions>15, mlabel(state) mlabs(small) mlabcolor(black) msize(vsmall) mcolor(black) msymbol()) , /// graphregion(color(white)) xtitle("Executions of Blacks, 1900-1972") ytitle("Lynchings of Blacks, 1877-1972") xsize(15) ysize(15) ylabel(, nogrid) /// legend(off) /// note() graph export "fig10_3a.png", width(1950) replace *figure 10.3b corr Lynchings Executions if race=="White" & Lynchings>15 & Executions>15 twoway (scatter Lynchings Executions if race=="White" & Lynchings>15 & Executions>15, mlabel(state) mlabs(small) mlabcolor(black) msize(vsmall) mcolor(black) msymbol()) , /// graphregion(color(white)) xtitle("Executions of Whites, 1900-1972") ytitle("Lynchings of Whites, 1877-1972") xsize(15) ysize(15) ylabel(, nogrid) /// legend(off) /// note() graph export "fig10_3b.png", width(1950) replace *figure 10.4 clear use sodium-thiopental-level.dta generate order = 1 if clinicalsignificance=="Exhibiting Consciousness" replace order = 2 if clinicalsignificance=="Lower than Surgicial Levels^" replace order = 3 if clinicalsignificance=="At or Above Surgical levels" #delimit ; graph pie percent, over(clinicalsignificance) sort(order) graphregion(color(white)) pie(1, color(gs10)) pie(2, color(gs6)) pie(3, color(gs0)) plabel(1 percent, format(%5.1fc) color(white)) plabel(2 percent, format(%5.1fc) color(white)) plabel(3 percent, format(%5.1fc) color(white)) legend(size(small) order(1 "Inmate Exibiting Signs of Consciousness" 2 "Lower Than Surgical Levels" 3 "At or Above Surgical Levels" )) ; graph export fig10_4.png, replace width(1950) *figure 12.1 clear use mental-illness-death-row.dta #delimit ; graph bar us_smi us_ami inmates if(topic==1), over(category, relabel(1 "Bipolar" 2 "Schizophrenia" 3 " PTSD" 4 "Antisocial" 5 "Anxiety" 6 "Depression" 7 "Personality" 8 "Total" ) label(angle(45) ) sort(inmate) ) graphregion(color(white)) bar(1, color(gs10)) bar(2, color(gs6)) bar(3, color(gs0)) ytitle("Percent") blabel(bar, format(%5.1fc) position(above) color(black) size(tiny)) ylabel(, nogrid) legend(order(1 "Public - Serious" 2 "Public - Any" 3 "Executed Inmates ") row(1)) title("", position(11)) subtitle("", position(11) ) note("") ; graph export fig12_1.png, replace width(1950) *figure 12.2a #delimit ; graph bar ratio_ami if(topic==1), over(category, relabel(1 "Bipolar" 2 "Schizophrenia" 3 " PTSD" 4 "Antisocial" 5 "Anxiety" 6 "Depression" 7 "Personality" 8 "Total" ) label(angle(0) alt) sort(ratio_ami) ) graphregion(color(white)) bar(1, color(gs0)) ytitle("Ratio") ylabel(, nogrid) blabel(bar, format(%5.1fc) position(above) color(black) size(small)) legend(off) title("", position(11)) subtitle("", position(11) ) caption() ; graph export fig12_2a.png, replace width(1950) *figure 12.2b #delimit ; graph bar ratio_smi if(topic==1), over(category, relabel(1 "Bipolar" 2 "Schizophrenia" 3 " PTSD" 4 "Antisocial" 5 "Anxiety" 6 "Depression" 7 "Personality" 8 "Total" ) label(angle(0) alt) sort(ratio_smi) ) graphregion(color(white)) bar(1, color(gs0)) ytitle("Ratio") blabel(bar, format(%5.1fc) position(above) color(black) size(small)) ylabel(, nogrid) legend(off) title("", position(11)) subtitle("", position(11) ) caption("") ; graph export fig12_2b.png, replace width(1950) *figure 12.3 #delimit ; graph bar us_ami inmates if(topic==2), over(category, relabel(1 "Sexual Abuse" 2 "Physical Abuse" 3 "Neglect" 4 "Total" ) label(angle(0) ) sort(inmate) ) graphregion(color(white)) bar(1, color(gs12)) bar(2, color(gs0)) ytitle("Percent with Childhood Abuse") ylabel(, nogrid) blabel(bar, format(%5.1fc) position(above) color(black) size(small)) legend(order(1 "General Public" 2 "Executed Inmates") row(1)) title("", position(11)) subtitle("", position(11) ) note("") ; graph export fig12_3.png, replace width(1950) *figure 12.4 #delimit ; graph bar nonvolunteers volunteers if(topic==3), over(category, relabel(1 "Depression" 2 "Suicidal Tendencies" 3 "Suicide Attempt" 4 "Mental Illness" ) label(angle(0) alt) sort(inmate) ) graphregion(color(white)) bar(1, color(gs12)) bar(2, color(gs0)) ytitle("Percent with Mental Illness") ylabel(, nogrid) blabel(bar, format(%5.1fc) position(above) color(black) size(small)) legend(order(1 "Non-Volunteers" 2 "Volunteers") row(1)) title("", position(11)) subtitle("", position(11) ) note("") ; graph export fig12_4.png, replace width(1950) *figure 13.1 clear use gallup-murder-opinion-36-to-15.dta gen datedec=year+((month-1)/12)+((date-1)/365) scatter year datedec sort datedec #delimit ; graph twoway connect proraw antiraw dkraw datedec, lpattern(solid dash dot) lcolor(black black black) lwidth(medium medium medium) msymbol(o o o) mcolor(black black black) msize(medsmall medsmall medsmall) connect(direct direct direct) cmiss(n n n) graphregion(color(white)) ylabel(, nogrid) yscale() ytitle("Percent") xscale() xlabel(1935(10)2015) xtitle("Year") legend(label (1 Support) label(2 Oppose) label(3 "Don't Know")) title("", color(black) position(11) justification(left)) note() ; graph export fig13_1.png, replace width(1950) *figure 13.2 clear import excel DPOpinionDatabase.xlsx, firstrow drop if Year<1972 #delimit ; graph twoway scatter Index Gal_Mur Nor_Mur Gal_Life Gal_Acc Gal_Oft Date_dec if Date_dec>1975.9999 , sort(Date_dec) connect(direct direct direct direct direct direct ) lpattern(solid solid shortdash dot solid dash ) lcolor(black black black black black black ) lwidth(thick medium medium medium thin thin) msymbol(none o o o o o) mcolor(none black black black black black) msize(zero small small small small small) cmiss(y) graphregion(color(white)) ylabel(, nogrid) yscale() ytitle("Percent Support") xscale() xlabel(1975(5)2015) xtitle("") legend(label(1 "Index") label(2 "Gallup Murder") label(3 "Norc Murder") label(4 "Gallup Life") label(5 "Gallup Morally Acceptable") label(6 "Gallup Too Often") ) title("", color(black) position(11) justification(left)) ; graph export fig13_2.png, replace width(1950) *figure 13.3 clear use DP-OpinionNov10.dta corr All7615Nov10 punitiveness sum All7615Nov10 punitiveness sum All7615Nov10 punitiveness if year==1976 replace DP76zero = All7615Nov10-58.792 replace Crime76zero = punitiveness-63.153 save DP-OpinionNov10.dta, replace sum All7615Nov10 if year==1976 gen All7615Base1976 = All7615Nov10-58.792 #delimit ; graph twoway scatter All7615Base1976 year if year>1975, sort(year) connect(direct ) lpattern(solid ) lcolor(black ) lwidth(medium ) cmiss(n n ) msymbol( none none ) mcolor() msize() text(9 1995 "1995: + 8.7" , placement(e)) text(-8 2014 "2015: - 6.9" , placement(w)) graphregion(color(white)) ylabel(, nogrid) yscale() xscale() xlabel(1975(5)2015) xtitle("") legend( ) caption("") ; graph export fig13_3.png, replace width(1950) *figure 13.4 clear use DP-opinion-and-sentences.dta #delimit ; graph twoway scatter dp76zero crime76zero year if year>1975, sort(year) connect(direct direct ) lpattern(solid dash ) lcolor(black black ) lwidth(medium medium ) cmiss(n n ) msymbol( none none ) mcolor() msize() graphregion(color(white)) ylabel(, nogrid) yscale() ytitle("Public Support for Hard-on-Crime Policies") xscale() xlabel(1975(5)2015) xtitle("") legend(label( 1 "Death Penalty") label(2 "Crime")) title("", color(black) position(11) justification(left)) note("") ; graph export fig13_4.png, replace width(1950) *figure 13.5 clear use DP-opinion-and-sentences.dta corr deathsentences dp76zero #delimit ; graph twoway (scatter deathsentences year, sort(year) lpattern(solid) lcolor(black) connect(direct) msymbol(none) lwidth(medium) yaxis(1)) (scatter dp76zero year , sort(year) lpattern(dash) lcolor(black) connect(direct) msymbol(none) lwidth(medium) yaxis(2)), graphregion(color(white)) ylabel(, nogrid) yscale() ytitle("Death Sentences", axis(1)) ytitle("Opinion", axis(2)) xscale() xlabel(1975(5)2015) xtitle("") legend(label(1 "Death Sentences") label(2 "Public Opinion")) title("", color(black) position(11) justification(left)) caption("") ; graph export fig13_5.png, replace width(1950) *figure 13.6 clear use "dpopinionbystate_withsurveyn.dta" regress dp_support_percent execcount if deathpenaltyabolish > 1990 *generating scatterplot of death penalty support and execcount with state labels #delimit ; scatter execcount dp_support_percent if deathpenaltyabolish > 1990, mlabel(state) mlabposition(0) mlabangle(0) msymbol(i) mlabsize(small) mlabcolor(black) ylabel(, nogrid) graphregion(color(white)) note("") ytitle("Executions", size (small)) xtitle("Percentage Support for Death Penalty", size (small)) ; graph export fig13_6.png, replace width(1950) *figure 13.7 clear use "texas_state_dp_support.dta", replace append using "harriscounty_supportDP.dta" save Texas-Harris-DP-Opinion.dta, replace clear use Texas-Harris-DP-Opinion.dta sum NetSupportTx NetSupportHarris *figure that compares DP support between state of Texas and Harris county #delimit; twoway scatter NetSupportTx NetSupportHarris Year, lcolor(black black) lpattern(solid dash) lwidth(medium medium) connect(yes yes) msymbol(o o) mcolor(black black) msize(medium medium) title("") graphregion(color(white)) xlabel(1993(2)2013) ylabel(, nogrid) legend(label(1 "Texas") label(2 "Harris County")) note() ytitle("Percent in Support") xtitle("Year") ; graph export fig13_7.png, replace width(1950) *fig 13.8 clear use TX-DFW-Austin-Houston-SA-Opinion.dta sum Houston DFW SanAntonio Austin Other *Figure that compares support for DP in Houston, DallasFtWorth, San Antonio and Austin to the State of Texas #delimit; twoway scatter Houston DFW SanAntonio Austin Other Date_dec, lcolor(black black black black black) lwidth(thick thick thick thin thin) lpattern(solid dash dot solid dash) mcolor(black black black black black) connect(y y y y y) title("") graphregion(color(white)) legend(label(1 "Houston") label(2 "Dallas Fort Worth") label(3 "San Antonio") label(4 "Austin") label(5 "Other Areas") rows(2)) ylabel(, nogrid) note() ytitle("Percent in Support") xtitle("Date") ; graph export fig13_8.png, replace width(1950) *fig 15.1 clear use deathpenalty-deterrence-opinion.dta gen datedec = year+((month-1)/11)+((day-1)/365.25) gen yes2 = yes gen no2 = no replace yes2 = . if year==2000 replace no2 = . if year==2000 reg yes2 datedec predict yespred #delimit ; twoway scatter yes datedec, mcolor(black)|| lfit yes datedec, clcolor(black ) clpattern(solid ) clwidth(medthick ) xtitle(Year) xlabel(1985(5)2005) caption() legend(off) graphregion(color(white)) cmiss(n) yvarl() ylabel(, nogrid) ytitle("Percent Saying Deters") note("") ; graph export fig15_1.png, replace width(1950) *figure 16.1a clear use dp-bills-by-year.dta #delimit ; graph twoway line total year , lp(solid solid solid) lw(thick ) lc(black black black) graphregion(color(white)) yscale() ylabel(, nogrid) ytitle("Number of State Bills") legend(off) xscale() xlabel(1990(5)2010) xtitle("Year") title( , color(black) position(11) justification(left)) caption("Source: Loyal 2013") ; graph export fig16_1a.png, replace width(1950) *fig 16.1b gen prepost2 = 0 recode prepost2 (0=1) if year>1998 sort year gen respct2=(restrictions * 100)/(expansions + restrictions) ttest respct2 , by(prepost2) gen pre3 = 40.84975 if prepost2==0 gen post3 = 75.32595 if prepost2==1 #delimit ; graph twoway line pre3 post3 respct2 year , lp(solid solid solid) lw(medium medium thick ) lc(black black black) graphregion(color(white)) yscale() ylabel(, nogrid) ytitle("Percent of Bills Restricting Use") legend(off) xscale() xlabel(1990(5)2010) xtitle("Year") title( , color(black) position(11) justification(left)) caption("Before 1999: 40.85; After 1998: 75.36; t = -9.58, df = 20; prob < 0.0000)" "Source: Loyal 2013") ; graph export fig16_1b.png, replace width(1950) *fig 16.2 clear import excel "Evidence-Of-DPs-Decline.xlsx", sheet("Sheet1") firstrow #delimit; twoway (line maxexec maxstates maxcounties maxsentences year, lcolor(black black black black) lpattern(solid dot longdash dash_dot)), graphregion(color(white)) ylabel(, nogrid) xlabel(1973(5)2015) ytitle("Usage (Maximum Use = 100)") xtitle("Year") legend(label(1 "Executions") label(2 "States Executing") label(3 "Counties Executing") label(4 "Sentences")) ; graph export fig16_2.png, replace width(1950) *fig 16.3 drop if year < 1995 #delimit; twoway (line maxexec maxstates maxcounties maxsentences year, lcolor(black black black black) lpattern(solid dot longdash dash_dot)) (line OpinionDeath year, yaxis(2) lcolor(black) lpattern(dash)), graphregion(color(white)) ylabel(, nogrid) xlabel(1995(5)2015) ytitle("Capital Punishment Usage (Maximum = 100)") xtitle("Year") legend(label(1 "Public Opinion") label(2 "Executions") label(3 "States Executing") label(4 "Counties Executing") label(5 "Sentences")) ; graph export fig16_3.png, replace width(1950) *fig 17.1 clear use cumulative-hom-ds-exec.dta format homs7314 sentences7315 execs7615 %7.0fc #delimit; graph bar homs7314 sentences7315 execs7615, legend(order(1 "Homicides" 2 "Death Sentences" 3 "Executions" ) row(1)) ytitle("") ylabel(0(200000)800000, format(%7.0fc) nogrid) bar(3, color(gs12)) bar(2, color(gs8)) bar(1, color(black)) blabel(bar, position(outside) format(%7.0fc) color(black) size(medium)) bargap(25) yline() graphregion(color(white)) note("", ) ; graph export fig17_1.png, replace width(1950) *fig 17.2 clear use execs-by-state-by-year-77-15.dta tsset statefips year, yearly gen TX = execs if statefips==48 gen OK = execs if statefips==40 gen VA = execs if statefips==51 gen FL = execs if statefips==12 gen MO = execs if statefips==29 gen GA = execs if statefips==13 gen AL = execs if statefips==1 gen OH = execs if statefips==39 gen NC = execs if statefips==37 gen SC = execs if statefips==45 gen AZ = execs if statefips==4 gen LA = execs if statefips==22 gen AR = execs if statefips==5 gen MS = execs if statefips==28 gen IN = execs if statefips==18 sum TX OK VA FL MO GA AL OH NC SC AZ LA AR MS IN #delimit; twoway scatter TX OK VA year, connect(y y y) lcolor(black black black ) lpattern(solid dash solid ) lwidth(medium medthick medium ) msymbol(o none none) mcolor(black white white) xtitle(Year ) xlabel(1975(10)2015) caption() graphregion(color(white)) ylabel(, nogrid) legend(label(1 "Texas") label(2 "Oklahoma") label(3 "Virginia") rows(1)) ytitle(Executions) ; graph export fig17_2.png, replace width(1950) *fig17.3a clear use execs-by-state-by-period.dta #delimit ; graph bar execs_1900s_pre76 if execs_1900s_pre76>200 , over(state, label(angle(90) ) sort( execs_1900s_pre76) ) graphregion(color(white)) bar(1, color(black)) aspectratio() blabel(total) ylabel(, nogrid) ytitle(Number of Executions) note() ; graph export fig17_3a.png, replace width(1950) *fig17.3b clear use execs-by-state.dta #delimit ; graph bar execs if execs>20, over(state, label( labsize(small) ) sort(execs) ) graphregion(color(white)) aspectratio() bar(1, color(black)) blabel(bar) ylabel(, nogrid) ytitle(Number of Executions) note("", span) ; graph export fig17_3b.png, replace width(1950)