* Benefits and Unintended Consequences of Gender Segregation in Public Transportation * Replication Do files * Final manuscript * October 2019 capture log close set more off clear all pause on log using "C:\Users\aaeag\Dropbox (Personal)\Metro_Zeky\Zeky\Paper\Final\StataResults.log", replace use "C:\Users\aaeag\Dropbox (Personal)\Metro_Zeky\Zeky\Paper\Final\paper.dta", clear global directory "C:\Users\aaeag\Dropbox (Personal)\Metro_Zeky\Zeky\Paper\Final" global tablesgraphs "C:\Users\aaeag\Dropbox (Personal)\Metro_UAM\Submission_Subway\EDCC\Accepted\Tables and Graphs" drop T_10 T_14 T_STD * Filters *drop if hora_llegada2tc(17:00) * RUNNING VARIABLE in minutes with respect to cutoffs gen morning=(hora_llegada2<=tc(12:00)) if hora_llegada2!=. gen Forcing10=round((hora_llegada2-tc(10:00))/tc(00:01)) if morning==1 gen Forcing14=round((hora_llegada2-tc(14:00))/tc(00:01)) if morning==0 gen ForcingS=-Forcing10 if morning==1 replace ForcingS=Forcing14 if morning==0 gen Hour=round((hora_llegada2)/tc(00:01)) if hora_llegada2!=. * TREATMENT VARIABLE (T=1 if program is operating) gen T_10=(hora_llegada2<=tc(10:00)) if hora_llegada2!=. gen T_14=(hora_llegada2>=tc(14:00)) if hora_llegada2!=. gen T_STD=(hora_llegada2<=tc(10:00) | hora_llegada2>=tc(14:00)) if hora_llegada2!=. gen T=(hora_llegada2<=tc(10:00) | hora_llegada2>=tc(14:00)) if hora_llegada2!=. * OUTCOME VARIABLES foreach gg in empujones peleas insultos robo { gen violencia_obs_`gg'M=(violencia_obs_`gg'==1 & victima_obs_`gg'==0) if violencia_obs_`gg'!=. replace violencia_obs_`gg'M=1 if violencia_obs_`gg'==1 & victima_obs_`gg'==3 gen violencia_obs_`gg'H=(violencia_obs_`gg'==1 & victima_obs_`gg'==1) if violencia_obs_`gg'!=. replace violencia_obs_`gg'H=1 if violencia_obs_`gg'==1 & victima_obs_`gg'==3 } foreach gg in miradas piropos fotos manoseos arrimones { gen violencia_obs_`gg'M=(violencia_obs_`gg'==1 & victima_obs_`gg'==1) if violencia_obs_`gg'!=. replace violencia_obs_`gg'M=1 if violencia_obs_`gg'==1 & victima_obs_`gg'==3 gen violencia_obs_`gg'H=(violencia_obs_`gg'==1 & victima_obs_`gg'==0) if violencia_obs_`gg'!=. replace violencia_obs_`gg'H=1 if violencia_obs_`gg'==1 & victima_obs_`gg'==3 } gen violencia_obs_fisicaM=(violencia_obs_empujonesM+violencia_obs_peleasM+violencia_obs_insultosM+violencia_obs_roboM>0) gen violencia_obs_sexualM=(violencia_obs_miradasM+violencia_obs_piroposM+violencia_obs_fotosM+violencia_obs_manoseosM+violencia_obs_arrimonesM>0) gen violencia_obs_fisicaH=(violencia_obs_empujonesH+violencia_obs_peleasH+violencia_obs_insultosH+violencia_obs_roboH>0) gen violencia_obs_sexualH=(violencia_obs_miradasH+violencia_obs_piroposH+violencia_obs_fotosH+violencia_obs_manoseosH+violencia_obs_arrimonesH>0) * CONTROL VARIABLES global controls "i.FE_fecha Casado Soltero hijos_dummy edad hijos morning" * Date FE tab FE_fecha, g(FE_Date) * Age groups gen edad_15_29=(edad>=15 & edad<=29) if edad!=. gen edad_30_44=(edad>=30 & edad<=44) if edad!=. gen edad_45_59=(edad>=45 & edad<=59) if edad!=. gen edad_60_99=(edad>=60) if edad!=. * Education groups gen educ_menos_prim=(educacion==1) & educacion!=. gen educ_prim=(educacion==2) & educacion!=. gen educ_sec=(educacion==3) & educacion!=. gen educ_ppa=(educacion==4) & educacion!=. gen educ_univ=(educacion==5) & educacion!=. gen educ_posg=(educacion==6) & educacion!=. * Frequency groups gen frec_diario=(frecuencia==1) if frecuencia!=. gen frec_sem=(frecuencia==2) if frecuencia!=. gen frec_otra=1-frec_diario-frec_sem if frecuencia!=. * Drop observations without controls available to use a consistent sample for varlist violencia_exp_fisica violencia_exp_sexual division_origen hora_llegada2 FE_fecha Casado Soltero hijos_dummy edad hijos morning: keep if X!=. for varlist violencia_exp_fisica violencia_exp_sexual division_origen hora_llegada2 FE_fecha Casado Soltero hijos_dummy edad hijos morning: keep if X!=.m for varlist violencia_exp_fisica violencia_exp_sexual division_origen hora_llegada2 FE_fecha Casado Soltero hijos_dummy edad hijos morning: keep if X!=.n *Generate polynomial terms for global parametric specification to be used as robustness check gen ForcingS_2=ForcingS^2 gen ForcingS_3=ForcingS^3 gen ForcingS_4=ForcingS^4 gen ForcingSM=ForcingS*morning gen ForcingSM_2=ForcingS^2*morning gen ForcingSM_3=ForcingS^3*morning gen ForcingSM_4=ForcingS^4*morning global Forcing_poly1 "ForcingS ForcingSM " global Forcing_poly2 "ForcingS ForcingSM ForcingS_2 ForcingSM_2 " global Forcing_poly3 "ForcingS ForcingSM ForcingS_2 ForcingSM_2 ForcingS_3 ForcingSM_3 " global Forcing_poly4 "ForcingS ForcingSM ForcingS_2 ForcingSM_2 ForcingS_3 ForcingSM_3 ForcingS_4 ForcingSM_4" * Baseline Forcing variables global Forcing_base "ForcingS ForcingS_2 ForcingS_3 ForcingSM ForcingSM_2 ForcingSM_3" * Variables to create the scatterplot with average means when each dot groups 20 minutes gen Forcing10_20m=round((hora_llegada2-tc(10:00))/tc(00:20)) if morning==1 gen Forcing14_20m=round((hora_llegada2-tc(14:00))/tc(00:20)) if morning==0 gen ForcingS_20m=-Forcing10_20m if morning==1 replace ForcingS_20m=Forcing14_20m if morning==0 * Simple version of running variable without re-centering gen ForcingSimple_20m=round(hora_llegada2/tc(00:20)) * Weights bysort ForcingS sexo: egen weight_var=count(T_STD) gen weight_P=1/weight_var * Regressions for graphs that partial out controls and create residuals in genera and by gender foreach var of varlist division_origen violencia_exp_sexual violencia_exp_fisica { reg `var' $controls predict e_`var', resid reg `var' $controls if sexo==0 predict eM_`var', resid reg `var' $controls if sexo==1 predict eH_`var', resid } * Save dataset with individual level observations save "$directory\Estand_individual_Metro_RR.dta", replace /* --------------------------------------------------------------------------- GRAPHS - MAIN PAPER ---------------------------------------------------------------------------*/ * FIGURE 1 - MC CRARY TEST rddensity ForcingS if sexo==0 & morning==1, plot /// graph_options(title("Density Time of the Day. Women, morning.", color(black)) graphr(c(white)) xtitle("Time of the day", color(black))) graph export "$tablesgraphs\Figure1_Women_Morning.png", as(png) replace rddensity ForcingS if sexo==0 & morning==0, plot /// graph_options(title("Density Time of the Day. Women, afternoon.", color(black)) graphr(c(white)) xtitle("Time of the day", color(black))) graph export "$tablesgraphs\Figure1_Women_Afternoon.png", as(png) replace rddensity ForcingS if sexo==1 & morning==1, plot /// graph_options(title("Density Time of the Day. Men, morning.", color(black)) graphr(c(white)) xtitle("Time of the day", color(black))) graph export "$tablesgraphs\Figure1_Men_Morning.png", as(png) replace rddensity ForcingS if sexo==1 & morning==0, plot /// graph_options(title("Density Time of the Day. Men, afternoon.", color(black)) graphr(c(white)) xtitle("Time of the day", color(black))) graph export "$tablesgraphs\Figure1_Men_Afternoon.png", as(png) replace preserve collapse (mean) e_* division_origen violencia_*_sexual violencia_*_fisica first_train, by(ForcingSimple_20m sexo) * FIGURE 2 - PROGRAM OPERATION graph twoway scatter division_origen ForcingSimple_20m if sexo==0 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Operation of Women-Only Cars. Women", si(medium) color(black)) /// ytitle(Pr(Division Enforced)) xtitle(Time of the day) yscale(range(0 1) li) ylabel(0 0.2 0.4 0.6 0.8 1) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure2_Women.png", as(png) replace graph twoway scatter division_origen ForcingSimple_20m if sexo==1 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Operation of Women-Only Cars. Men", si(medium) color(black)) /// ytitle(Pr(Division Enforced)) xtitle(Time of the day) yscale(range(0 1) li) ylabel(0 0.2 0.4 0.6 0.8 1) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure2_Men.png", as(png) replace * FIGURE 3 - SEXUAL VIOLENCE graph twoway scatter violencia_exp_sexual ForcingSimple_20m if sexo==0 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Sexual Violence. Women", si(medium) color(black)) /// ytitle(Pr(Experienced Violence)) xtitle(Time of the day) yscale(range(0 0.3) on fill li) ylabel(0 0.05 0.1 0.15 0.2 0.25 0.3) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure3_Women.png", as(png) replace graph twoway scatter violencia_exp_sexual ForcingSimple_20m if sexo==1 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Sexual Violence. Men", si(medium) color(black)) /// ytitle(Pr(Experienced Violence)) xtitle(Time of the day) yscale(range(0 0.3) on fill li) ylabel(0 0.05 0.1 0.15 0.2 0.25 0.3) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure3_Men.png", as(png) replace * FIGURE 4 - PHYSICAL VIOLENCE graph twoway scatter violencia_exp_fisica ForcingSimple_20m if sexo==0 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Physical Violence. Women", si(medium) color(black)) /// ytitle(Pr(Experienced Violence)) xtitle(Time of the day) yscale(range(0 0.8) li) ylabel(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure4_Women.png", as(png) replace graph twoway scatter violencia_exp_fisica ForcingSimple_20m if sexo==1 & ForcingSimple_20m>24 & ForcingSimple_20m<60, /// title("Physical Violence. Men", si(medium) color(black)) /// ytitle(Pr(Experienced Violence)) xtitle(Time of the day) yscale(range(0 0.8) li) ylabel(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8) graphr(c(white)) /// xlabel(24 "8:00am" 30 "10:00am" 36 "12:00pm" 42 "2:00pm" 48 "4:00pm" 54 "6:00pm" 60 "8:00pm") xline(30 42, lp(dash) lcolor(black)) mcolor(black) graph export "$tablesgraphs\Figure4_Men.png", as(png) replace restore /* --------------------------------------------------------------------------- TABLES - MAIN PAPER ---------------------------------------------------------------------------*/ * TABLE 1 - DESCRIPTIVE STATS SAMPLE VERSUS CONAPRED sum Casado hijos_dummy hijos edad_* educ_* frec_* if sexo==0 sum Casado hijos_dummy hijos edad_* educ_* frec_* if sexo==1 * TABLE 2 - VIOLENCE DESCRIPTIVE STATS sum violencia_exp_fisica violencia_exp_empujones violencia_exp_peleas violencia_exp_insultos violencia_exp_robo /// violencia_exp_sexual violencia_exp_miradas violencia_exp_piropos violencia_exp_fotos /// violencia_exp_manoseos violencia_exp_arrimones if sexo==0 sum violencia_exp_fisica violencia_exp_empujones violencia_exp_peleas violencia_exp_insultos violencia_exp_robo /// violencia_exp_sexual violencia_exp_miradas violencia_exp_piropos violencia_exp_fotos /// violencia_exp_manoseos violencia_exp_arrimones if sexo==1 sum violencia_obs_fisica violencia_obs_empujones violencia_obs_peleas violencia_obs_insultos violencia_obs_robo /// violencia_obs_sexual violencia_obs_miradas violencia_obs_piropos violencia_obs_fotos /// violencia_obs_manoseos violencia_obs_arrimones if sexo==0 sum violencia_obs_fisica violencia_obs_empujones violencia_obs_peleas violencia_obs_insultos violencia_obs_robo /// violencia_obs_sexual violencia_obs_miradas violencia_obs_piropos violencia_obs_fotos /// violencia_obs_manoseos violencia_obs_arrimones if sexo==1 * TABLE 4 - EFFECT ON PROGRAM OPERATION rdrobust e_division_origen ForcingS if sexo==0, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", replace excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_division_origen ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_division_origen ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_division_origen ForcingS if sexo==1, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_division_origen ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_division_origen ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) sum division_origen if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_division_origen ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table4.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') * TABLE 5 - REDUCED FORM SEXUAL VIOLENCE * Overall effect rdrobust e_violencia_exp_sexual ForcingS if sexo==0, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", replace excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_sexual ForcingS if sexo==1, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) sum violencia_exp_sexual if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table5A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') * Detailed effect foreach var of varlist violencia_exp_miradas violencia_exp_piropos violencia_exp_fotos violencia_exp_manoseos violencia_exp_arrimones { local j=1 reg `var' $controls predict e_`var', resid forvalues i=0/1 { rdrobust e_`var' ForcingS if sexo==`i', c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 rdrobust e_`var' ForcingS if sexo==`i' & morning==1, c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 rdrobust e_`var' ForcingS if sexo==`i' & morning==0, c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table5B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 } } * TABLE 6 - PHYSICAL (NON-SEXUAL) VIOLENCE * Overall effect rdrobust e_violencia_exp_fisica ForcingS if sexo==0, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", replace excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==0 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_fisica ForcingS if sexo==1, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==1 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==1, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) sum violencia_exp_fisica if ForcingS>-e(h_l) & ForcingS<0 & sexo==1 & morning==0 local media=r(mean) local sd=r(sd) rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==0, c(0) h(120) kernel(tri) outreg2 using "$tablesgraphs\Table6A.xls", append excel bd(3) sd(4) br adds(Mean, `media', SD, `sd') * Detailed effect foreach var of varlist violencia_exp_empujones violencia_exp_peleas violencia_exp_insultos violencia_exp_robo { local j=1 reg `var' $controls predict e_`var', resid forvalues i=0/1 { rdrobust e_`var' ForcingS if sexo==`i', c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 rdrobust e_`var' ForcingS if sexo==`i' & morning==1, c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 rdrobust e_`var' ForcingS if sexo==`i' & morning==0, c(0) h(120) kernel(tri) if `j'==1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", replace excel bd(3) sd(4) br } if `j'>1 { outreg2 using "$tablesgraphs\Table6B_`var'.xls", append excel bd(3) sd(4) br } local j=`j'+1 } } * TABLE 3 - MEAN DIFFERENCES AND RD EFFECTS ON CONTROLS gen HS_less=(educacion<=4) if educacion!=. gen frequent=(frecuencia<=2) if frecuencia!=. gen agebelow30=edad<30 gen agebelow35=edad<35 gen agebelow40=edad<40 gen agebelow45=edad<45 gen willing_pay=Disp_Hoy==1 global VarsT6 "willing_pay frequent agebelow30 agebelow35 agebelow40 agebelow45 hijos_dummy HS_less estudia trabaja coche" * Mean Differences regress Casado T_STD if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\Table3A_M.xls", excel bracket replace regress Casado T_STD if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\Table3A_H.xls", excel bracket replace foreach var of varlist $VarsT6 { regress `var' T_STD if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\Table3A_M.xls", excel bracket append regress `var' T_STD if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\Table3A_H.xls", excel bracket append } global VarsRDT6 "willing_pay frequent agebelow30 agebelow35 agebelow40 agebelow45 hijos_dummy HS_less estudia trabaja coche" global controls2 "i.FE_fecha morning" * RD estimates foreach var of varlist $VarsRDT6 { reg `var' $controls2 predict e_`var', resid forvalues i=0/1 { rdrobust e_`var' ForcingS if sexo==`i', c(0) h(120) kernel(tri) } } * TABLE A1 - EXTERNAL VALIDITY global VarsTX "willing_pay frequent edad hijos_dummy HS_less estudia trabaja coche violencia_exp_fisica violencia_exp_sexual" g IDsample=ForcingS<120 * Mean Differences regress Casado IDsample if sexo==0, robust outreg2 using "$directory\Paper_Tables\TableA1_M.xls", excel bracket replace regress Casado IDsample if sexo==1, robust outreg2 using "$directory\Paper_Tables\TableA1_H.xls", excel bracket replace foreach var of varlist $VarsTX { regress `var' IDsample if sexo==0, robust outreg2 using "$directory\Paper_Tables\TableA1_M.xls", excel bracket append regress `var' IDsample if sexo==1, robust outreg2 using "$directory\Paper_Tables\TableA1_H.xls", excel bracket append } * TABLE 8 - LOCAL RANDOMIZATION APPROACH set more off putexcel clear cd "$directory\Paper_Tables\" foreach var of varlist division_origen violencia_exp_sexual violencia_exp_fisica { putexcel set Table8_`var', replace putexcel A1=("Females") D1=("Males") A2=("T") B2=("p-value") C2=("N") D2=("T") E2=("p-value") F2=("N") forvalues k=1/6 { local ww=`k'*10 local nn=`k'+2 rdrandinf `var' ForcingS if sexo==0, c(0) wl(-`ww') wr(`ww') p(0) kernel(uniform) nulltau(0) putexcel A`nn'=(r(obs_stat)) B`nn'=(r(randpval)) C`nn'=(r(N)) rdrandinf `var' ForcingS if sexo==1, c(0) wl(-`ww') wr(`ww') p(0) kernel(uniform) nulltau(0) putexcel D`nn'=(r(obs_stat)) E`nn'=(r(randpval)) F`nn'=(r(N)) } putexcel clear } * TABLE 9 /*WILLINGNESS TO PAY*/ gen logprice=log(Disp_Hoy_Rango) gen morning_sexual=morning*violencia_exp_sexual gen morning_fisica=morning*violencia_exp_fisica reg Disp_Hoy logprice $controls if sexo==0, robust outreg2 logprice using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket replace logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==0, robust outreg2 logprice violencia_exp_sexual violencia_exp_fisica using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket append logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==0, robust outreg2 logprice violencia_exp_sexual violencia_exp_fisica morning_sexual morning_fisica using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket append reg Disp_Hoy logprice $controls if sexo==1, robust outreg2 logprice using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket append logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==1, robust outreg2 logprice violencia_exp_sexual violencia_exp_fisica using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket append logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==1, robust outreg2 logprice violencia_exp_sexual violencia_exp_fisica morning_sexual morning_fisica using "$directory\Paper_Tables\Table9.xls", keep(logprice violencia_exp_sexual violencia_exp_fisica) excel bracket append * Generar errores estandar para los WTP bootstrap WTP_M1_sex=_b[violencia_exp_sexual]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==0, robust bootstrap WTP_M1_fis=_b[violencia_exp_fisica]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==0, robust bootstrap WTP_M2_sex=_b[violencia_exp_sexual]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==0, robust bootstrap WTP_M2_fis=_b[violencia_exp_fisica]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==0, robust * Generar errores estandar para los WTP bootstrap WTP_H1_sex=_b[violencia_exp_sexual]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==1, robust bootstrap WTP_H1_fis=_b[violencia_exp_fisica]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica if sexo==1, robust bootstrap WTP_H2_sex=_b[violencia_exp_sexual]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==1, robust bootstrap WTP_H2_fis=_b[violencia_exp_fisica]/_b[logprice], r(500): logit Disp_Hoy logprice violencia_exp_sexual violencia_exp_fisica Casado Soltero hijos_dummy edad hijos morning FE_Date* if sexo==1, robust * TABLE 7 * ---------- LEAVING OUT A BAND AROUND DISCONTINUITY ---------------- * Generate an ID variable for the band exercise forvalues nn=0/5 { preserve drop if ForcingS>0-5*`nn' & ForcingS<0+5*`nn' & ForcingS!=. * FIRST STAGE rdrobust e_division_origen ForcingS if sexo==0, c(0) h(120) kernel(tri) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", replace excel bd(3) sd(4) br rdrobust e_division_origen ForcingS if sexo==0 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_division_origen ForcingS if sexo==0 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_division_origen ForcingS if sexo==1, c(0) h(120) kernel(tri) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_division_origen ForcingS if sexo==1 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_division_origen ForcingS if sexo==1 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_FS_`nn'.xls", append excel bd(3) sd(4) br * REDUCED FORM - SEXUAL rdrobust e_violencia_exp_sexual ForcingS if sexo==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", replace excel bd(3) sd(4) br rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_sexual ForcingS if sexo==0 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_sexual ForcingS if sexo==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_sexual ForcingS if sexo==1 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVS_`nn'.xls", append excel bd(3) sd(4) br * REDUCED FORM - PHYSICAL rdrobust e_violencia_exp_fisica ForcingS if sexo==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", replace excel bd(3) sd(4) br rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_fisica ForcingS if sexo==0 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_fisica ForcingS if sexo==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==1, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", append excel bd(3) sd(4) br rdrobust e_violencia_exp_fisica ForcingS if sexo==1 & morning==0, c(0) kernel(tri) h(120) outreg2 using "$directory\Paper_Tables\Table7_RFVP_`nn'.xls", append excel bd(3) sd(4) br restore } /* ---------------------------------------------------------------------------- APPENDIX TABLES ----------------------------------------------------------------------------*/ * TABLE A6 - ROBUSTNESS: DIFFERENT FUNCTIONAL FORMS * First stage regress division_origen T_STD $Forcing_poly1 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket replace regress division_origen T_STD $Forcing_poly2 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly3 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly4 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly1 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly2 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly3 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append regress division_origen T_STD $Forcing_poly4 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6A.xls", excel bracket append * Reduced form: sexual violence regress violencia_exp_sexual T_STD $Forcing_poly1 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket replace regress violencia_exp_sexual T_STD $Forcing_poly2 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly3 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly4 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly1 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly2 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly3 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append regress violencia_exp_sexual T_STD $Forcing_poly4 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6B.xls", excel bracket append * Reduced form: physical violence regress violencia_exp_fisica T_STD $Forcing_poly1 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket replace regress violencia_exp_fisica T_STD $Forcing_poly2 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly3 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly4 $controls if sexo==0, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly1 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly2 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly3 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append regress violencia_exp_fisica T_STD $Forcing_poly4 $controls if sexo==1, robust outreg2 T_STD using "$directory\Paper_Tables\TableA6C.xls", excel bracket append * TABLE A4: * RESTRICTING OBSERVATIONS TO LESS THAN x STATIONS TRIP * Coding of length of trip g viaje_1=estacion_origen g viaje_2=estacion replace viaje_1=. if estacion_origen==888 | estacion_origen==999 replace viaje_2=. if estacion==888 | estacion==999 replace viaje_1=estacion_origen+2 if estacion_origen>=57 & viaje_1!=. replace viaje_2=estacion+2 if estacion>=57 & viaje_2!=. replace viaje_1=estacion_origen+1 if estacion_origen==56 & viaje_1!=. replace viaje_2=estacion+1 if estacion==56 & viaje_2!=. replace viaje_1=. if estacion_origen==41 replace viaje_2=. if estacion==41 replace viaje_1=56 if estacion_origen==8 & estacion>=34 & viaje_2!=. replace viaje_2=56 if estacion==8 & estacion_origen>=34 & viaje_1!=. replace viaje_1=58 if estacion_origen==34 & viaje_1!=. replace viaje_2=58 if estacion==34 & viaje_2!=. g leng_trip=abs(viaje_2-viaje_1) replace leng_trip=. if leng_trip==0 replace leng_trip=. if leng_trip>23 & viaje_1>=41 & viaje_1!=. replace leng_trip=. if leng_trip>19 & viaje_1<=20 & viaje_1!=. * Distribution of trip length tab leng_trip * Distribution of boarding station tab viaje_1 if viaje_1>viaje_2 & viaje_1>=44 tab viaje_1 if viaje_1=44 tab viaje_1 if viaje_1>viaje_2 & viaje_1<=20 tab viaje_1 if viaje_1=18, ti(Experienced Sexual Violence by Age) /// sub(Women) xtitle(Age (years)) ytitle(Fraction Reporting Experienced Sexual Violence) graphr(c(white)) graph export "$directory\Paper_Graphs\GraphA2_Violence_age.png", as(png) replace * TABLE A7 - APPENDIX * WILLINGNESS TO PAY ALWAYS gen logpriceS=log(Disp_Siemp_Rango) gen logpS_sexual=logpriceS*violencia_exp_sexual gen logpS_fisica=logpriceS*violencia_exp_fisica reg Disp_Siem logpriceS $Forcing_base $controls if sexo==0, robust outreg2 logpriceS using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS) excel bracket replace reg Disp_Siem logpriceS violencia_exp_sexual violencia_exp_fisica $Forcing_base $controls if sexo==0, robust outreg2 logpriceS violencia_exp_sexual violencia_exp_fisica using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS violencia_exp_sexual violencia_exp_fisica) excel bracket append reg Disp_Siem logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica $Forcing_base $controls if sexo==0, robust outreg2 logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica) excel bracket append reg Disp_Siem logpriceS $Forcing_base $controls if sexo==1, robust outreg2 logpriceS using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS) excel bracket append reg Disp_Siem logpriceS violencia_exp_sexual violencia_exp_fisica $Forcing_base $controls if sexo==1, robust outreg2 logpriceS violencia_exp_sexual violencia_exp_fisica using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS violencia_exp_sexual violencia_exp_fisica) excel bracket append reg Disp_Siem logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica $Forcing_base $controls if sexo==1, robust outreg2 logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica using "$directory\Paper_Tables\TableA7.xls", keep(logpriceS violencia_exp_sexual violencia_exp_fisica logpS_sexual logpS_fisica) excel bracket append