File size: 2,383 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

**********************************************************************
*** FIGURE A6
*** Permutation Inference
**********************************************************************

use "Data\county_day_data.dta", clear

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

***number of counties 1,478
***number of rallies 196
g FAKE_EFFECT = .
forval iter = 1/1000 {
    di "ITERATION " `iter'
	qui: {
	g random_date = floor(runiform(20256,20765))
	g random_order = runiform()
	g random_county = floor(runiform(1,1479))
	sort random_order
	
	g FAKE_event_day_Trump_1 = .
	g FAKE_event_day_Trump_2 = .
	g FAKE_event_day_Trump_3 = .
	g FAKE_event_day_Trump_4 = .
	g FAKE_event_day_Trump_5 = .
	g FAKE_event_day_Trump_6 = .
	g FAKE_event_day_Trump_7 = .
	g FAKE_event_day_Trump_8 = .
	g FAKE_event_day_Trump_9 = .
	
	forval ii=1/196 {
	    local completed = 0
		local counter = 1
	    while `completed' == 0 {
		    
		    su FAKE_event_day_Trump_`counter' if county_id == random_county[`ii']
			
			if r(N) == 0 {
				replace FAKE_event_day_Trump_`counter' = random_date[`ii'] if county_id==random_county[`ii']
				local completed = 1
				}
			else {
			    local counter = `counter' + 1
			}
		}
	}

	
	forval ii = 1/9 {
		g dist_event`ii' = day_id - FAKE_event_day_Trump_`ii'
	} 
	
	g TRUMP_0 = 0
	forval ii = 1/9 {
	replace TRUMP_0 = 1 if dist_event`ii' == 0 & dist_event`ii'!=.
	}
	*
	
	g TRUMP_POST_1_30 = 0
	forval ii = 1/9 {
	replace TRUMP_POST_1_30 = 1 if (dist_event`ii' > 0 & dist_event`ii'<=30 & dist_event`ii'!=.)
	}
	
	
	g TRUMP_POST_M30 = 0
	forval ii = 1/9 {
	replace TRUMP_POST_M30 = 1 if (dist_event`ii' >30 & dist_event`ii'!=.)
	}
	
	g TRUMP_PRE_M30 = 0
	forval ii = 1/9 {
	replace TRUMP_PRE_M30 = 1 if (dist_event`ii' <-30 & dist_event`ii'!=.)
	}
		
	reghdfe black_ps 1.TRUMP_*  [w=n_stops], a(i.county_id i.day_id i.county_id#c.day_id) cluster(county_id day_id)
	replace FAKE_EFFECT = _b[1.TRUMP_POST_1_30] in `iter'
	
	drop FAKE_event_day_Trump_* random_* dist_event* TRUMP_*
	}
}

drop if FAKE_EFFECT == .

hist FAKE_EFFECT if FAKE_EFFECT>-1.5 & FAKE_EFFECT<2, xline(1.07, lwidth(1)) percent xtitle("Coefficient on Fake Trump Rally")  xlabel(-1.5(0.5)2) graphregion(color(white)) scheme(s1mono)
graph export "Results\FigureA6.pdf", as(pdf) name("Graph") replace