File size: 3,524 Bytes
4328c38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

**********************************************************************
*** TABLE A6
*** The Differential Effect of Trump and Other Political Rallies on 
*** the Probability of a Black Stop
**********************************************************************

use "Data\stoplevel_data.dta", clear

merge n:1 county_fips using "Data\allcandidates_rallies.dta"

keep if year==2015 | year==2016 | year==2017
drop dist_event*

forval ii = 1/4 {
	g dist_event`ii' = day_id - event_day_Cruz_`ii'
} 
g CRUZ_0 = 0
forval ii = 1/4 {
replace CRUZ_0 = 1 if dist_event`ii' == 0 & dist_event`ii'!=.
}
*
g CRUZ_POST_1_30 = 0
forval ii = 1/4 {
replace CRUZ_POST_1_30 = 1 if (dist_event`ii' > 0 & dist_event`ii'<=30 & dist_event`ii'!=.)
}
g CRUZ_POST_M30 = 0
forval ii = 1/4 {
replace CRUZ_POST_M30 = 1 if (dist_event`ii' >30 & dist_event`ii'!=.)
}
g CRUZ_PRE_M30 = 0
forval ii = 1/4 {
replace CRUZ_PRE_M30 = 1 if (dist_event`ii' <-30 & dist_event`ii'!=.)
}
drop dist_event* 

forval ii = 1/10 {
	g dist_event`ii' = day_id - event_day_Clinton_`ii'
} 
g CLINTON_0 = 0
forval ii = 1/10 {
replace CLINTON_0 = 1 if dist_event`ii' == 0 & dist_event`ii'!=.
}
*
g CLINTON_POST_1_30 = 0
forval ii = 1/10 {
replace CLINTON_POST_1_30 = 1 if (dist_event`ii' > 0 & dist_event`ii'<=30 & dist_event`ii'!=.)
}
g CLINTON_POST_M30 = 0
forval ii = 1/10 {
replace CLINTON_POST_M30 = 1 if (dist_event`ii' >30 & dist_event`ii'!=.)
}
g CLINTON_PRE_M30 = 0
forval ii = 1/10 {
replace CLINTON_PRE_M30 = 1 if (dist_event`ii' <-30 & dist_event`ii'!=.)
}
drop dist_event*  
drop black
g black =  (subject_race==2) * 100

egen t = group(day_id)

g anyrally_0 = (TRUMP_0==1 | CRUZ_0==1 | CLINTON_0==1)  
g anyrally_1_30 = (TRUMP_POST_1_30==1 | CRUZ_POST_1_30==1 | CLINTON_POST_1_30==1)  
g anyrally_POST_M30 = (TRUMP_POST_M30==1 | CRUZ_POST_M30==1 | CLINTON_POST_M30==1)  
g anyrally_PRE_M30 = (TRUMP_PRE_M30==1 | CRUZ_PRE_M30==1 | CLINTON_PRE_M30==1)  

reghdfe black TRUMP_0 TRUMP_POST_1_30 TRUMP_POST_M30 TRUMP_PRE_M30 anyrally_0 anyrally_1_30 anyrally_POST_M30 anyrally_PRE_M30, absorb(county_fips day_id county_fips#c.day_id) cluster(county_fips day_id)
outreg2 using "Results\TableA6.txt", replace se bdec(3) sdec(3) rdec(3) coefastr alpha(0.01, 0.05, 0.10) symbol(***, **, *) bfmt(fc) keep(anyrally_1_30 TRUMP_POST_1_30) label nonotes nocons noni

*******************************************************************************************************************
use   "Data\stops_2007_09.dta", clear 

forval ii = 1/3 {
	g dist_event`ii' = day_id - event_day_Obama_`ii'
} 

g OBAMA_0 = 0
forval ii = 1/3 {
replace OBAMA_0 = 1 if dist_event`ii' == 0 & dist_event`ii'!=.
}
*
g OBAMA_POST_1_30 = 0
forval ii = 1/3 {
replace OBAMA_POST_1_30 = 1 if (dist_event`ii' > 0 & dist_event`ii'<=30 & dist_event`ii'!=.)
}
g OBAMA_POST_M30 = 0
forval ii = 1/3 {
replace OBAMA_POST_M30 = 1 if (dist_event`ii' >30 & dist_event`ii'!=.)
}
g OBAMA_PRE_M30 = 0
forval ii = 1/3 {
replace OBAMA_PRE_M30 = 1 if (dist_event`ii' <-30& dist_event`ii'!=.)
}
g black = 100*(subject_race == 2)

g sep = "-"
egen state_county = concat(state sep county_name)
drop sep
egen county_id = group(state_county)

reghdfe black 1.OBAMA_*  , a(i.county_id i.day_id i.county_id#c.day_id) cluster(county_id day_id )
outreg2 using "Results\TableA6.txt", append se bdec(3) sdec(3) rdec(3) coefastr alpha(0.01, 0.05, 0.10) symbol(***, **, *) bfmt(fc) keep(1.OBAMA_POST_1_30) label nonotes nocons noni