anonymous-submission-acl2025 commited on
Commit
d892022
·
1 Parent(s): c385d98
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. 108/paper.pdf +3 -0
  2. 108/replication_package/Code/Step1_MainAnalysisAndData.R +259 -0
  3. 108/replication_package/Code/Step2_AppendixAnalysis.R +320 -0
  4. 108/replication_package/Code/Step3_TablesAndFigures.R +630 -0
  5. 108/replication_package/Codebook.pdf +3 -0
  6. 108/replication_package/Data/CMPD_Employee_Demographics-2.csv +3 -0
  7. 108/replication_package/Data/FLInter_Contra.RData +3 -0
  8. 108/replication_package/Data/FLInter_Search.RData +3 -0
  9. 108/replication_package/Data/FLSearch_Exper_OLS.RData +3 -0
  10. 108/replication_package/Data/FLSearch_OLS.RData +3 -0
  11. 108/replication_package/Data/FLSearch_OLS_FE.RData +3 -0
  12. 108/replication_package/Data/FLSearch_Prop_OLS.RData +3 -0
  13. 108/replication_package/Data/FLSearch_Sm_OLS.RData +3 -0
  14. 108/replication_package/Data/FLSearch_StopType_OLS.RData +3 -0
  15. 108/replication_package/Data/FL_Aggregated-2.RData +3 -0
  16. 108/replication_package/Data/Fig1_Data-2.RData +3 -0
  17. 108/replication_package/Data/FlContra_Exper_OLS.RData +3 -0
  18. 108/replication_package/Data/FlContra_Logit.RData +3 -0
  19. 108/replication_package/Data/FlContra_OLS.RData +3 -0
  20. 108/replication_package/Data/FlContra_OLS_FE.RData +3 -0
  21. 108/replication_package/Data/FlContra_Prop_OLS.RData +3 -0
  22. 108/replication_package/Data/FlContra_Sm_OLS.RData +3 -0
  23. 108/replication_package/Data/FlContra_StopType_OLS.RData +3 -0
  24. 108/replication_package/Data/FlSearchRate_Exper_OLS.RData +3 -0
  25. 108/replication_package/Data/FlSearchRate_Inter_OLS.RData +3 -0
  26. 108/replication_package/Data/FlSearchRate_OLS.RData +3 -0
  27. 108/replication_package/Data/FlSearchRate_OLS_FE.RData +3 -0
  28. 108/replication_package/Data/FlSearchRate_StopType_OLS.RData +3 -0
  29. 108/replication_package/Data/FlStopRate_Exper_OLS.RData +3 -0
  30. 108/replication_package/Data/FlStopRate_Inter_OLS.RData +3 -0
  31. 108/replication_package/Data/FlStopRate_OLS.RData +3 -0
  32. 108/replication_package/Data/FlStopRate_OLS_FE.RData +3 -0
  33. 108/replication_package/Data/FlStopRate_StopType_OLS.RData +3 -0
  34. 108/replication_package/Data/FloridaLarge.RData +3 -0
  35. 108/replication_package/Data/FloridaSmall.RData +3 -0
  36. 108/replication_package/Data/NCInter_Search.RData +3 -0
  37. 108/replication_package/Data/NCSearch_Exper_OLS.RData +3 -0
  38. 108/replication_package/Data/NCSearch_Logit.RData +3 -0
  39. 108/replication_package/Data/NCSearch_OLS.RData +3 -0
  40. 108/replication_package/Data/NCSearch_Sm_OLS.RData +3 -0
  41. 108/replication_package/Data/NCSearch_StopType_OLS.RData +3 -0
  42. 108/replication_package/Data/NorthCarolina.RData +3 -0
  43. 108/replication_package/Data/Officer_Traffic_Stops_Original.csv +3 -0
  44. 108/replication_package/Data/Officer_Traffic_Stops_Update.csv +3 -0
  45. 108/replication_package/Data/fl_statewide_2019_08_13.csv +3 -0
  46. 108/replication_package/Figures/Fig1_PredProb.png +3 -0
  47. 108/replication_package/Figures/Fig2_PredProb.png +3 -0
  48. 108/replication_package/OutputFiles/Step1_MainAnalysisAndData.html +0 -0
  49. 108/replication_package/OutputFiles/Step2_AppendixAnalysis.html +0 -0
  50. 108/replication_package/OutputFiles/Step3_TablesAndFigures.html +0 -0
108/paper.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b66be3b035bbc53e722346d2b7c0ee93865e87f98eb560a4303f2fca449eb93
3
+ size 1047731
108/replication_package/Code/Step1_MainAnalysisAndData.R ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #######
2
+ #######
3
+ ####### Replication files for Do Women Officers Police Differently? Evidence from Traffic Stops
4
+ ####### This file cleans the raw data and runs the analysis for the body of the paper.
5
+ ####### Last Updated: Jan. 2021
6
+ #######
7
+ #######
8
+
9
+
10
+ ###
11
+ ### 1. Setting up the space.
12
+ ###
13
+
14
+ # Setting the working directory:
15
+ setwd("~/Desktop/PinkPolicing/AJPS_ReplicationFiles")
16
+
17
+ # Installing the needed libraries:
18
+ #install.packages("pscl",dependencies = T)
19
+ #install.packages("ggplot2",dependencies = T)
20
+ #install.packages("texreg",dependencies = T)
21
+ #install.packages("readr",dependencies = T)
22
+ #install.packages("arm",dependencies = T)
23
+ #install.packages("dplyr",dependencies = T)
24
+
25
+ # Opening up those libraries:
26
+ library(dplyr)
27
+ library(ggplot2)
28
+ library(texreg)
29
+ library(readr)
30
+ library(pscl)
31
+ library(arm)
32
+
33
+ # Loading the raw data:
34
+ nc_new = read_csv("Data/Officer_Traffic_Stops_Update.csv")
35
+ nc_old = read_csv("Data/Officer_Traffic_Stops_Original.csv")
36
+ nc = bind_rows(nc_new,nc_old)
37
+ fl = read_csv("Data/fl_statewide_2019_08_13.csv")
38
+
39
+
40
+ ###
41
+ ### 2. Producing the data sets for each table.
42
+ ###
43
+
44
+ # Cleaning the NC Data
45
+ nc$driver_re = as.numeric(ifelse(nc$Driver_Race=="White"&
46
+ nc$Driver_Ethnicity=="Non-Hispanic","0",
47
+ ifelse(nc$Driver_Race=="Black"&
48
+ nc$Driver_Ethnicity=="Non-Hispanic","1",
49
+ ifelse(nc$Driver_Ethnicity=="Hispanic","2",NA))))
50
+ nc$of_rg = ifelse(nc$Officer_Race=="White",
51
+ ifelse(nc$Officer_Gender=="Male","0","1"),
52
+ ifelse(nc$Officer_Race=="Black/African American",
53
+ ifelse(nc$Officer_Gender=="Male","2","3"),NA))
54
+ nc$of_race = ifelse(nc$Officer_Race=="White",0,
55
+ ifelse(nc$Officer_Race=="Black/African American",1,NA))
56
+ nc$of_gender = ifelse(nc$Officer_Gender=="Male","0","1")
57
+ nc$investigatory = ifelse(grepl("Impaired|Speeding|Light|Movement",
58
+ as.character(nc$Reason_for_Stop)),0,1)
59
+ nc$investigatory = ifelse(grepl("Check",as.character(nc$Reason_for_Stop)),
60
+ NA,nc$investigatory)
61
+ nc$race_gender = ifelse(nc$driver_re=="0",
62
+ ifelse(nc$Driver_Gender=="Male","0","1"),
63
+ ifelse(nc$driver_re=="1",
64
+ ifelse(nc$Driver_Gender=="Male","2","3"),NA))
65
+ nc$search = ifelse(nc$Was_a_Search_Conducted=="Yes",1,0)
66
+
67
+ nc$subject_sex = tolower(nc$Driver_Gender)
68
+ nc$subject_age = nc$Driver_Age
69
+ nc$officer_sex = tolower(nc$Officer_Gender)
70
+ nc$month = apply(as.matrix(as.character(nc$Month_of_Stop)),1,
71
+ function(x){strsplit(x,"/",fixed=T)[[1]][2]})
72
+ nc$year = apply(as.matrix(as.character(nc$Month_of_Stop)),1,
73
+ function(x){strsplit(x,"/",fixed=T)[[1]][1]})
74
+
75
+ nc$arrest = ifelse(nc$Result_of_Stop=="Arrest",1,0)
76
+ save(nc,file="Data/NorthCarolina.RData")
77
+
78
+ # Cleaning the FL data.
79
+ violations_list = strsplit(paste(fl$reason_for_stop,collapse = "|"),"|",fixed = T)
80
+ violations_list_small = unique(violations_list[[1]])[2:71]
81
+ violations_indicator = violations_list_small[c(1,2,5,6,7,9,10,14,19,
82
+ 20,23,40,45)]
83
+ fl$investigatory = ifelse(is.na(fl$violation),NA,
84
+ ifelse(fl$violation %in% violations_indicator, 0, 1))
85
+ fl$contraband_found = ifelse(grepl("contraband",
86
+ tolower(fl$violation)),1,0)
87
+ fl$race_gender = ifelse(fl$subject_race=="white",
88
+ ifelse(fl$subject_sex=="male",0,1),
89
+ ifelse(fl$subject_race=="black",
90
+ ifelse(fl$subject_sex=="male",2,3),
91
+ ifelse(fl$subject_race=="hispanic",
92
+ ifelse(fl$subject_sex=="male",4,5),NA)))
93
+ fl$of_rg = ifelse(fl$officer_race=="white",
94
+ ifelse(fl$officer_sex=="male",0,1),
95
+ ifelse(fl$officer_race=="black",
96
+ ifelse(fl$officer_sex=="male",2,3),
97
+ ifelse(fl$officer_race=="hispanic",
98
+ ifelse(fl$officer_sex=="male",4,5),NA)))
99
+ fl$of_race = ifelse(fl$officer_race=="white",0,
100
+ ifelse(fl$officer_race=="black",1,
101
+ ifelse(fl$officer_race=="hispanic",2,
102
+ ifelse(fl$officer_race=="asian/pacific islander",3,
103
+ ifelse(fl$officer_race=="other",4,NA)))))
104
+ fl$of_gender = ifelse(fl$officer_sex=="male",0,1)
105
+ fl$out_of_state = ifelse(fl$vehicle_registration_state=="FL",0,1)
106
+ fl$hour_of_day = apply(as.matrix(as.character(fl$time)),1,
107
+ function(x)(strsplit(x,":",fixed = T)[[1]][1]))
108
+ fl$month = apply(as.matrix(as.character(fl$date)),1,
109
+ function(x)(paste(strsplit(x,"-",fixed = T)[[1]][2],
110
+ collapse = "_")))
111
+ fl$year = apply(as.matrix(as.character(fl$date)),1,
112
+ function(x)(paste(strsplit(x,"-",fixed = T)[[1]][1],
113
+ collapse = "_")))
114
+ fl = subset(fl,fl$year!="2016"&fl$year!="2017"&fl$year!="2018") #Narrows down to complete years that don't report extreme misingness on key outcome.
115
+ fl.officers = names(table(fl$officer_id_hash))[table(fl$officer_id_hash)>1000]
116
+ fl$officers_include = ifelse(fl$officer_id_hash%in%fl.officers,1,0)
117
+ fl.counties = names(table(fl$county_name))[table(fl$county_name)>1000]
118
+ fl$county_include = ifelse(fl$county_name%in%fl.counties,1,0)
119
+ fl.ag.id = aggregate(fl$of_gender,
120
+ list(fl$officer_id_hash,fl$year,fl$county_name),
121
+ mean)
122
+ fl.ag.id$officer = ifelse(!is.na(fl.ag.id$x),1,0)
123
+ fl.ag.gender = aggregate(fl.ag.id[,c("x","officer")],
124
+ list(fl.ag.id$Group.2,fl.ag.id$Group.3),
125
+ sum,na.rm=T)
126
+ fl.ag.gender$prop.female = fl.ag.gender$x/fl.ag.gender$officer
127
+ colnames(fl.ag.gender) = c("year","county_name","count.female","tot.officer","prop.female")
128
+ fl = merge(fl,fl.ag.gender,by=c("year","county_name"),all.x=T)
129
+ fl$officer_exclude = ifelse(fl$officer_years_of_service<0|fl$officer_years_of_service>40,1,0)
130
+ fl.ag.id2 = aggregate(fl$of_gender,
131
+ list(fl$officer_id_hash),
132
+ mean)
133
+ fl$search_occur = ifelse(fl$search_conducted == 0, 0,
134
+ ifelse(fl$search_basis != "other",1,NA))
135
+ fl$contra = ifelse(is.na(fl$search_occur),0,
136
+ ifelse(fl$search_occur==1,fl$contraband_found,0))
137
+
138
+ complete = complete.cases(fl[,c("search_occur","race_gender","subject_age",
139
+ "out_of_state","investigatory","of_gender",
140
+ "of_race","officer_years_of_service","officer_age",
141
+ "hour_of_day","month","year","county_name")])
142
+ fl.sm = fl[complete,]
143
+ complete2 = complete.cases(fl[,c("search_occur","of_gender")])
144
+ table(complete)
145
+ table(complete2)
146
+
147
+ fl.missingness = apply(fl[,c("search_occur","race_gender","subject_age",
148
+ "out_of_state","investigatory","of_gender",
149
+ "of_race","officer_years_of_service","officer_age",
150
+ "county_name")],
151
+ 2,
152
+ FUN = function(x){table(is.na(x))})
153
+ save(fl,file="Data/FloridaLarge.RData")
154
+ save(fl.sm,file="Data/FloridaSmall.RData")
155
+
156
+ fl$stops = ifelse(!is.na(fl$search_occur),1,0)
157
+ fl$contra.ttest = ifelse(fl$search_occur==1,fl$contra,NA)
158
+ prop.test(table(fl$of_gender,fl$contra.ttest))
159
+ fl$of_exper = ifelse(fl$officer_years_of_service>=
160
+ mean(fl$officer_years_of_service,na.rm=T),1,0)
161
+ fl$of_age = ifelse(fl$officer_age<30,1,
162
+ ifelse(fl$officer_age>64,3,2))
163
+ fl$driver_age = ifelse(fl$subject_age<30,1,
164
+ ifelse(fl$subject_age>64,3,2))
165
+ fl$hour_of_day2 = as.numeric(fl$hour_of_day)
166
+ fl$tod = ifelse(fl$hour_of_day2<3,1,
167
+ ifelse(fl$hour_of_day2<6,2,
168
+ ifelse(fl$hour_of_day2<9,3,
169
+ ifelse(fl$hour_of_day2<12,4,
170
+ ifelse(fl$hour_of_day2<15,5,
171
+ ifelse(fl$hour_of_day2<18,6,
172
+ ifelse(fl$hour_of_day2<21,7,8)))))))
173
+
174
+ fl.ag.officers = aggregate(fl[,c("stops","search_occur","contra")],
175
+ by=list(fl$officer_id_hash,
176
+ fl$of_race,fl$of_gender,
177
+ fl$of_exper,fl$of_age,
178
+ fl$race_gender,fl$driver_age,
179
+ fl$out_of_state,fl$investigatory,
180
+ fl$year,fl$tod),
181
+ sum,na.rm=T)
182
+ colnames(fl.ag.officers) = c("officer_id","of_race","of_gender","of_exper",
183
+ "of_age","race_gender","driver_age",
184
+ "out_of_state","investigatory","year",
185
+ "tod","stops","search_occur","contra")
186
+ fl.ag.officers$contra.search.rate = (fl.ag.officers$contra/fl.ag.officers$search_occur)*10
187
+ fl.ag.officers$contra.stop.rate = (fl.ag.officers$contra/fl.ag.officers$stops)*100
188
+ save(fl.ag.officers,file="Data/FL_Aggregated.RData")
189
+
190
+ # Data for Figure 1
191
+ search.df = data.frame("Department" = c("CPD","CPD","FHP","FHP"),
192
+ "Gender" = c("Male","Female","Male","Female"),
193
+ "Rate" = c(prop.table(table(nc$of_gender,nc$search),1)[,2],
194
+ prop.table(table(fl$of_gender[fl.sm$county_include==1&
195
+ fl.sm$officer_exclude==0],
196
+ fl$search_occur[fl.sm$county_include==1&
197
+ fl.sm$officer_exclude==0]),1)[,2]))
198
+ save(search.df,file="Data/Fig1_Data.RData")
199
+
200
+ ###
201
+ ### 3. Regressions
202
+ ###
203
+
204
+ #
205
+ # For the Main Text:
206
+ #
207
+
208
+ # Search Regressions
209
+ fl.search.sm = lm(search_occur~factor(of_gender),data=fl)
210
+ save(fl.search.sm, file="Data/FLSearch_Sm_OLS.RData")
211
+ fl.search = lm(search_occur~factor(race_gender)+
212
+ subject_age+out_of_state+
213
+ investigatory+
214
+ factor(of_gender)+factor(of_race)+
215
+ officer_years_of_service+officer_age+
216
+ factor(hour_of_day)+factor(month)+factor(year)+
217
+ factor(county_name),
218
+ data=fl.sm,
219
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0)
220
+ save(fl.search,file="Data/FLSearch_OLS.RData")
221
+ nc.search.sm = lm(search~factor(of_gender),data = nc)
222
+ save(nc.search.sm,file="Data/NCSearch_Sm_OLS.RData")
223
+ nc.search = lm(search~factor(race_gender)+subject_age+
224
+ investigatory+
225
+ factor(of_race)+
226
+ factor(of_gender)+Officer_Years_of_Service+
227
+ factor(month)+factor(year)+
228
+ factor(CMPD_Division),
229
+ data=nc)
230
+ save(nc.search,file="Data/NCSearch_OLS.RData")
231
+
232
+ # Contraband Regressions
233
+ fl.contra = lm(contra~factor(race_gender)+
234
+ subject_age+out_of_state+
235
+ investigatory+
236
+ factor(of_gender)+factor(of_race)+
237
+ officer_years_of_service+officer_age+
238
+ factor(hour_of_day)+factor(month)+factor(year)+
239
+ factor(county_name),
240
+ data=fl.sm,
241
+ subset=fl.sm$county_include==1&
242
+ fl.sm$search_occur==1&
243
+ fl.sm$officer_exclude==0)
244
+ save(fl.contra,file="Data/FlContra_OLS.RData")
245
+ contra.search.rate.reg = lm(contra.search.rate ~ factor(of_gender) + factor(of_exper) +
246
+ factor(of_age) +factor(of_race) +
247
+ factor(race_gender) + factor(driver_age)+
248
+ investigatory + out_of_state +
249
+ factor(year)+factor(tod),
250
+ data=fl.ag.officers,
251
+ subset=fl.ag.officers$search_occur>0)
252
+ save(contra.search.rate.reg,file="Data/FlSearchRate_OLS.RData")
253
+ contra.stop.rate.reg = lm(contra.stop.rate ~ factor(of_gender) + factor(of_exper) +
254
+ factor(of_age) + factor(of_race) +
255
+ factor(race_gender) + factor(driver_age)+
256
+ investigatory + out_of_state +
257
+ factor(year)+factor(tod),
258
+ data=fl.ag.officers)
259
+ save(contra.stop.rate.reg,file="Data/FlStopRate_OLS.RData")
108/replication_package/Code/Step2_AppendixAnalysis.R ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #######
2
+ #######
3
+ ####### Replication files for Do Women Officers Police Differently? Evidence from Traffic Stops
4
+ ####### This file runs most of the supplemental regressions shown in the appendix.
5
+ ####### Last Updated: Jan. 2021
6
+ #######
7
+ #######
8
+
9
+ # Opening up those libraries:
10
+ library(dplyr)
11
+ library(ggplot2)
12
+ library(texreg)
13
+ library(readr)
14
+ library(pscl)
15
+ library(arm)
16
+
17
+ # Setting the working directory:
18
+ setwd("~/Desktop/PinkPolicing/AJPS_ReplicationFiles")
19
+
20
+ #
21
+ # Appendix: Alternative Specifications
22
+ #
23
+
24
+ # Clearing the workspace.
25
+ rm(list = ls())
26
+
27
+ # Loading in the Data
28
+ load("Data/FloridaSmall.RData")
29
+ load("Data/FL_Aggregated.RData")
30
+
31
+ # FE for Officer
32
+ fl.search = lmer(search_occur~factor(race_gender)+
33
+ subject_age+out_of_state+
34
+ investigatory+
35
+ factor(of_gender)+factor(of_race)+
36
+ officer_years_of_service+officer_age+
37
+ factor(hour_of_day)+factor(month)+factor(year)+
38
+ factor(county_name)+(1|officer_id_hash),
39
+ data=fl.sm,
40
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0)
41
+ save(fl.search,file="Data/FLSearch_OLS_FE.RData")
42
+ fl.contra = lmer(contra~factor(race_gender)+
43
+ subject_age+out_of_state+
44
+ investigatory+
45
+ factor(of_gender)+factor(of_race)+
46
+ officer_years_of_service+officer_age+
47
+ factor(hour_of_day)+factor(month)+factor(year)+factor(county_name)+
48
+ (1|officer_id_hash),
49
+ data=fl.sm,
50
+ subset=fl.sm$county_include==1&
51
+ fl.sm$search_occur==1&
52
+ fl.sm$officer_exclude==0)
53
+ save(fl.contra,file="Data/FlContra_OLS_FE.RData")
54
+ contra.search.rate.reg = lmer(contra.search.rate ~ factor(of_gender) + factor(of_exper) +
55
+ factor(of_age) +factor(of_race) +
56
+ factor(race_gender) + factor(driver_age)+
57
+ investigatory + out_of_state +
58
+ factor(year)+factor(tod)+
59
+ (1|officer_id),
60
+ data=fl.ag.officers,
61
+ subset=fl.ag.officers$search_occur>0)
62
+ save(contra.search.rate.reg,file="Data/FlSearchRate_OLS_FE.RData")
63
+ contra.stop.rate.reg = lmer(contra.stop.rate ~ factor(of_gender) + factor(of_exper) +
64
+ factor(of_age) + factor(of_race) +
65
+ factor(race_gender) + factor(driver_age)+
66
+ investigatory + out_of_state +
67
+ factor(year)+factor(tod)+(1|officer_id),
68
+ data=fl.ag.officers)
69
+ save(contra.stop.rate.reg,file="Data/FlStopRate_OLS_FE.RData")
70
+
71
+ # Logistc Regressions
72
+ rm(list = ls())
73
+
74
+ load("Data/NorthCarolina.RData")
75
+ load("Data/FloridaSmall.RData")
76
+
77
+ fl.search = glm(search_occur~factor(race_gender)+
78
+ subject_age+out_of_state+
79
+ investigatory+
80
+ factor(of_gender)+factor(of_race)+
81
+ officer_years_of_service+officer_age+
82
+ factor(hour_of_day)+factor(month)+factor(year)+
83
+ factor(county_name),
84
+ data=fl.sm,family="binomial",
85
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0)
86
+ save(fl.search,file="Data/FLSearch_Logit.RData")
87
+ nc.search = glm(search~factor(race_gender)+subject_age+
88
+ investigatory+
89
+ factor(of_race)+
90
+ factor(of_gender)+Officer_Years_of_Service+
91
+ factor(month)+factor(year)+
92
+ factor(CMPD_Division),
93
+ family="binomial",
94
+ data=nc)
95
+ save(nc.search,file="Data/NCSearch_Logit.RData")
96
+ fl.contra = glm(contra~factor(race_gender)+
97
+ subject_age+out_of_state+
98
+ investigatory+
99
+ factor(of_gender)+factor(of_race)+
100
+ officer_years_of_service+officer_age+
101
+ factor(hour_of_day)+factor(month)+factor(year)+
102
+ factor(county_name),
103
+ data=fl.sm, family = "binomial",
104
+ subset=fl.sm$county_include==1&
105
+ fl.sm$search_occur==1&
106
+ fl.sm$officer_exclude==0)
107
+ save(fl.contra,file="Data/FlContra_Logit.RData")
108
+
109
+
110
+ #
111
+ # Appendix: Interaction Models
112
+ #
113
+
114
+ rm(list = ls())
115
+
116
+ load("Data/NorthCarolina.RData")
117
+ load("Data/FloridaSmall.RData")
118
+ load("Data/FloridaLarge.RData")
119
+ load("Data/FL_Aggregated.RData")
120
+
121
+
122
+ # Experience
123
+ fl.search.exper = lm(search_occur~factor(race_gender)+
124
+ subject_age+out_of_state+
125
+ investigatory+factor(of_race)+
126
+ factor(of_gender)*officer_years_of_service+officer_age+
127
+ factor(hour_of_day)+factor(month)+factor(year)+
128
+ factor(county_name),
129
+ data=fl.sm,
130
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0)
131
+ save(fl.search.exper,file="Data/FLSearch_Exper_OLS.RData")
132
+ nc.search.exper = lm(search~factor(race_gender)+subject_age+
133
+ investigatory+factor(of_race)+
134
+ factor(of_gender)*Officer_Years_of_Service+
135
+ factor(month)+factor(year)+
136
+ factor(CMPD_Division),
137
+ data=nc)
138
+ save(nc.search.exper,file="Data/NCSearch_Exper_OLS.RData")
139
+ fl.contra.exper = lm(contra~factor(race_gender)+
140
+ subject_age+out_of_state+
141
+ investigatory+factor(of_gender)*officer_years_of_service+
142
+ factor(of_race)+officer_age+
143
+ factor(hour_of_day)+factor(month)+factor(year)+
144
+ factor(county_name),
145
+ data=fl.sm,
146
+ subset=fl.sm$county_include==1&
147
+ fl.sm$search_occur==1&
148
+ fl.sm$officer_exclude==0)
149
+ save(fl.contra.exper,file="Data/FlContra_Exper_OLS.RData")
150
+ contra.search.rate.exper = lm(contra.search.rate ~ factor(of_gender)*factor(of_exper) +
151
+ investigatory+factor(of_age) +factor(of_race) +
152
+ factor(race_gender) + factor(driver_age)+
153
+ out_of_state +
154
+ factor(year),
155
+ data=fl.ag.officers,
156
+ subset=fl.ag.officers$search_occur>0)
157
+ save(contra.search.rate.exper,file="Data/FlSearchRate_Exper_OLS.RData")
158
+ contra.stop.rate.exper = lm(contra.stop.rate ~ factor(of_gender)*factor(of_exper) +
159
+ investigatory+
160
+ factor(of_age) +factor(of_race) +
161
+ factor(race_gender) + factor(driver_age)+
162
+ out_of_state +
163
+ factor(year),
164
+ data=fl.ag.officers)
165
+ save(contra.stop.rate.exper,file="Data/FlStopRate_Exper_OLS.RData")
166
+
167
+ # Prop Female
168
+ fl$male.officer = ifelse(fl$of_gender==1,0,1)
169
+ fl.ag = aggregate(fl$officer_id_hash,
170
+ by=list(fl$of_gender,fl$county_name,fl$year),
171
+ function(x){length(unique(x))})
172
+ fl.ag.m = fl.ag[fl.ag$Group.1==0,]
173
+ fl.ag.f = fl.ag[fl.ag$Group.1==1,]
174
+ colnames(fl.ag.m)=c("male","county_name","year","male.count")
175
+ colnames(fl.ag.f)=c("female","county_name","year","female.count")
176
+ fl.ag = merge(fl.ag.m,fl.ag.f,all=T)
177
+ fl.ag$male.count[is.na(fl.ag$male.count)] = 0
178
+ fl.ag$female.count[is.na(fl.ag$female.count)] = 0
179
+ fl.ag$female.prop = fl.ag$female.count/(fl.ag$female.count+fl.ag$male.count)
180
+ summary(fl.ag$female.prop)
181
+ fl.sm = merge(fl.sm,fl.ag)
182
+ fl.search.prop = lm(search_occur~factor(race_gender)+
183
+ subject_age+out_of_state+
184
+ investigatory+factor(of_race)+
185
+ factor(of_gender)*female.prop+officer_years_of_service+officer_age+
186
+ factor(hour_of_day)+factor(month)+factor(year)+
187
+ factor(county_name),
188
+ data=fl.sm,
189
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0)
190
+ save(fl.search.prop,file="Data/FLSearch_Prop_OLS.RData")
191
+ fl.contra.prop = lm(contra~factor(race_gender)+
192
+ subject_age+out_of_state+
193
+ investigatory+factor(of_gender)*female.prop+
194
+ officer_years_of_service+
195
+ factor(of_race)+officer_age+
196
+ factor(hour_of_day)+factor(month)+factor(year)+
197
+ factor(county_name),
198
+ data=fl.sm,
199
+ subset=fl.sm$county_include==1&
200
+ fl.sm$search_occur==1&
201
+ fl.sm$officer_exclude==0)
202
+ save(fl.contra.prop,file="Data/FlContra_Prop_OLS.RData")
203
+
204
+ # Stop Type
205
+ fl.search.st = lm(search_occur~factor(race_gender)+
206
+ subject_age+out_of_state+
207
+ factor(of_gender)+factor(of_race)+
208
+ officer_years_of_service+officer_age+
209
+ factor(hour_of_day)+factor(month)+factor(year)+
210
+ factor(county_name),
211
+ data=fl.sm,
212
+ subset=fl.sm$county_include==1&fl.sm$officer_exclude==0&
213
+ fl.sm$investigatory==1)
214
+ save(fl.search.st,file="Data/FLSearch_StopType_OLS.RData")
215
+ nc.search.st = lm(search~factor(race_gender)+subject_age+
216
+ factor(of_gender)+
217
+ factor(of_race)+Officer_Years_of_Service+
218
+ factor(month)+factor(year)+
219
+ factor(CMPD_Division),
220
+ data=nc,
221
+ subset = nc$investigatory==1)
222
+ save(nc.search.st,file="Data/NCSearch_StopType_OLS.RData")
223
+ fl.contra.st = lm(contra~factor(race_gender)+
224
+ subject_age+out_of_state+
225
+ factor(of_gender)+
226
+ factor(of_race)+
227
+ officer_years_of_service+officer_age+
228
+ factor(hour_of_day)+factor(month)+factor(year)+
229
+ factor(county_name),
230
+ data=fl.sm,
231
+ subset=fl.sm$county_include==1&
232
+ fl.sm$search_occur==1&
233
+ fl.sm$officer_exclude==0&
234
+ fl.sm$investigatory==1)
235
+ save(fl.contra.st,file="Data/FlContra_StopType_OLS.RData")
236
+ contra.search.rate.st = lm(contra.search.rate ~ factor(of_gender)+
237
+ factor(of_exper) +
238
+ factor(of_age) +factor(of_race) +
239
+ factor(race_gender) + factor(driver_age)+
240
+ out_of_state +
241
+ factor(year),
242
+ data=fl.ag.officers,
243
+ subset=fl.ag.officers$search_occur>0&
244
+ fl.ag.officers$investigatory==1)
245
+ save(contra.search.rate.st,file="Data/FlSearchRate_StopType_OLS.RData")
246
+ contra.stop.rate.st = lm(contra.stop.rate ~ factor(of_gender)+
247
+ factor(of_exper) +
248
+ factor(of_age) +factor(of_race) +
249
+ factor(race_gender) + factor(driver_age)+
250
+ out_of_state +
251
+ factor(year),
252
+ data=fl.ag.officers,
253
+ subset=fl.ag.officers$investigatory==1)
254
+ save(contra.stop.rate.st,file="Data/FlStopRate_StopType_OLS.RData")
255
+
256
+ # Driver Characteristics
257
+ fl.sm$subject_female = ifelse(fl.sm$subject_sex=="female",1,0)
258
+ fl.sm$subject_race2 = ifelse(fl.sm$subject_race=="white",0,
259
+ ifelse(fl.sm$subject_race=="black",1,2))
260
+ fl.search.inter = lm(search_occur~factor(of_gender)*factor(subject_female)+
261
+ factor(of_race)*factor(subject_race2)+
262
+ subject_age+out_of_state+investigatory+
263
+ officer_years_of_service+officer_age+
264
+ factor(hour_of_day)+factor(month)+factor(year)+
265
+ factor(county_name),
266
+ data=fl.sm,
267
+ subset=fl.sm$county_include==1&
268
+ fl.sm$officer_exclude==0&
269
+ as.numeric(fl.sm$of_race)<3)
270
+ save(fl.search.inter,file="Data/FLInter_Search.RData")
271
+ fl.contra.inter = lm(contra~factor(of_gender)*factor(subject_female)+
272
+ factor(of_race)*factor(subject_race2)+
273
+ subject_age+out_of_state+investigatory+
274
+ officer_years_of_service+officer_age+
275
+ factor(hour_of_day)+factor(month)+factor(year)+
276
+ factor(county_name),
277
+ data=fl.sm,
278
+ subset=fl.sm$search_occur==1&
279
+ fl.sm$county_include==1&
280
+ fl.sm$officer_exclude==0&
281
+ as.numeric(fl.sm$of_race)<3)
282
+ save(fl.contra.inter,file="Data/FLInter_Contra.RData")
283
+ fl.ag.officers$subject_female = ifelse(fl.ag.officers$race_gender%in%c(1,3,5),1,0)
284
+ fl.ag.officers$subject_race2 = ifelse(fl.ag.officers$race_gender%in%c(0,1),0,
285
+ ifelse(fl.ag.officers$race_gender%in%c(2,3),1,2))
286
+ contra.search.rate.inter = lm(contra.search.rate ~ factor(of_gender)*factor(subject_female) +
287
+ factor(of_race) * factor(subject_race2)+
288
+ factor(of_exper) + factor(of_age) +
289
+ factor(race_gender) + factor(driver_age)+
290
+ investigatory + out_of_state +
291
+ factor(year),
292
+ data=fl.ag.officers,
293
+ subset=fl.ag.officers$search_occur>0)
294
+ save(contra.search.rate.inter,file="Data/FlSearchRate_Inter_OLS.RData")
295
+ contra.stop.rate.inter = lm(contra.stop.rate ~ factor(of_gender)*factor(subject_female) +
296
+ factor(of_race) * factor(subject_race2)+
297
+ factor(of_exper) + factor(of_age) +
298
+ factor(race_gender) + factor(driver_age)+
299
+ investigatory + out_of_state +
300
+ factor(year),
301
+ data=fl.ag.officers)
302
+ save(contra.stop.rate.inter,file="Data/FlStopRate_Inter_OLS.RData")
303
+
304
+ nc$of_race = ifelse(nc$Officer_Race=="White",0,
305
+ ifelse(nc$Officer_Race=="Black/African American",1,
306
+ ifelse(nc$Officer_Race=="Hispanic/Latino",2,NA)))
307
+ nc$subject_female = ifelse(nc$Driver_Gender=="Female",1,0)
308
+ nc$subject_race2 = ifelse(nc$Driver_Race=="White"&
309
+ nc$Driver_Ethnicity=="Non-Hispanic",0,
310
+ ifelse(nc$Driver_Race=="Black"&
311
+ nc$Driver_Ethnicity=="Non-Hispanic",1,
312
+ ifelse(nc$Driver_Ethnicity=="Hispanic",2,NA)))
313
+ nc.search.inter = lm(search~factor(of_gender)*factor(subject_female)+
314
+ factor(of_race)*factor(subject_race2)+
315
+ subject_age+investigatory+
316
+ Officer_Years_of_Service+
317
+ factor(month)+factor(year)+
318
+ factor(CMPD_Division),
319
+ data=nc)
320
+ save(nc.search.inter,file = "Data/NCInter_Search.RData")
108/replication_package/Code/Step3_TablesAndFigures.R ADDED
@@ -0,0 +1,630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #######
2
+ #######
3
+ ####### Replication files for Do Women Officers Police Differently? Evidence from Traffic Stops
4
+ ####### This file produces the tables and figures seen in the paper and appendix.
5
+ ####### Last Updated: Jan. 2021
6
+ #######
7
+ #######
8
+
9
+ ###
10
+ ### 1. Setting up the space.
11
+ ###
12
+
13
+ # Setting the working directory:
14
+ setwd("~/Desktop/PinkPolicing/AJPS_ReplicationFiles")
15
+
16
+ # Installing the needed libraries:
17
+ #install.packages("pscl",dependencies = T)
18
+ #install.packages("ggplot2",dependencies = T)
19
+ #install.packages("texreg",dependencies = T)
20
+ #install.packages("readr",dependencies = T)
21
+ #install.packages("arm",dependencies = T)
22
+
23
+ # Opening up those libraries:
24
+ library(ggplot2)
25
+ library(texreg)
26
+ library(readr)
27
+ library(pscl)
28
+ library(arm)
29
+
30
+ ###
31
+ ### 2. Body of the Paper
32
+ ###
33
+
34
+ # Clearing the workspace + reading in data bit by bit to produce each table and figure.
35
+ rm(list = ls())
36
+
37
+ # Loading in the Data
38
+ load("Data/NorthCarolina.RData")
39
+ load("Data/FloridaLarge.RData")
40
+ load("Data/FloridaSmall.RData")
41
+ cmpd.employee = read_csv("Data/CMPD_Employee_Demographics.csv")
42
+
43
+ # Number of stops and searches by sex:
44
+ dim(fl)
45
+ dim(nc)
46
+
47
+ table(fl$search_occur)
48
+ table(nc$search)
49
+
50
+ prop.table(table(fl$search_occur))
51
+ prop.table(table(nc$search))
52
+
53
+ table(fl$of_gender)
54
+ table(nc$of_gender)
55
+
56
+ table(fl$of_gender,fl$search_occur)
57
+ table(nc$of_gender,nc$search)
58
+
59
+ prop.table(table(fl$of_gender,fl$search_occur),1)
60
+ prop.table(table(nc$of_gender,nc$search),1)
61
+
62
+ table(fl$of_gender,fl$contra)
63
+
64
+ # Number of officers by sex in FL
65
+ length(unique(fl$officer_id_hash))
66
+ length(unique(fl$officer_id_hash[fl$of_gender==0]))
67
+ length(unique(fl$officer_id_hash[fl$of_gender==1]))
68
+
69
+ length(unique(fl$officer_id_hash[fl$officer_exclude==0]))
70
+ length(unique(fl$officer_id_hash[fl$of_gender==0&fl$officer_exclude==0]))
71
+ length(unique(fl$officer_id_hash[fl$of_gender==1&fl$officer_exclude==0]))
72
+
73
+ table(cmpd.employee$JOB_TITLE[cmpd.employee$JOB_TITLE=="Police Officer"])
74
+ sum(table(cmpd.employee$Gender[cmpd.employee$JOB_TITLE=="Police Officer"]))
75
+
76
+ table(fl$year)
77
+ (table(fl$of_gender)/c(length(unique(fl$officer_id_hash[fl$of_gender==0&fl$officer_exclude==0])),length(unique(fl$officer_id_hash[fl$of_gender==1&fl$officer_exclude==0]))))/6
78
+
79
+ avg.stops = aggregate(fl$year,by=list(fl$officer_id_hash,fl$year,fl$of_gender),length)
80
+ summary(avg.stops)
81
+ mean(avg.stops$x)
82
+ median(avg.stops$x[avg.stops$Group.3==0])
83
+ median(avg.stops$x[avg.stops$Group.3==1])
84
+
85
+ prop.table(table(fl$investigatory[fl$of_gender==0]))
86
+ prop.table(table(fl$investigatory[fl$of_gender==1]))
87
+
88
+ table(nc$of_gender[nc$year==2019])[2:1]/table(cmpd.employee$Gender[cmpd.employee$JOB_TITLE=="Police Officer"])
89
+
90
+ # Excluding Cases:
91
+ dim(nc)
92
+ dim(nc)-dim(nc[!is.na(nc$search),])
93
+ dim(fl)
94
+ dim(fl)-dim(fl[!is.na(fl$search_occur),])
95
+ (dim(fl[!is.na(fl$search_occur),])-dim(fl.sm))+table(fl.sm$officer_exclude)[2]
96
+ table(fl.sm$county_include)
97
+
98
+ # Table 1
99
+ tab1 = data.frame("Department"=c("Charlotte PD (NC)",
100
+ "Male Officers","Female Officers",
101
+ "Florida Highwar Patrol",
102
+ "Male Officers","Female Officers"),
103
+ "Type"=c("Municipal","","","Statewide","",""),
104
+ "Years"=c("2016-2017","","",
105
+ "2010-2015","",""),
106
+ "Stops"=c(dim(nc)[1],table(nc$of_gender),
107
+ dim(fl[!is.na(fl$search_occur),])[1],
108
+ table(fl$of_gender[!is.na(fl$search_occur)])),
109
+ "Searches"=c(table(nc$search)[2],table(nc$of_gender,nc$search)[,2],
110
+ table(fl$search_occur)[2],
111
+ table(fl$of_gender,fl$search_occur)[,2]),
112
+ "Search Rate"=c(table(nc$search)[2]/dim(nc)[1],
113
+ table(nc$of_gender,nc$search)[,2]/table(nc$of_gender),
114
+ table(fl$search_occur)[2]/dim(fl[!is.na(fl$search_occur),])[1],
115
+ table(fl$of_gender,fl$search_occur)[,2]/
116
+ table(fl$of_gender[!is.na(fl$search_occur)])))
117
+ tab1 = rbind(tab1,
118
+ c("Total","","",
119
+ sum(tab1[c(1,4),4]),sum(tab1[c(1,4),5]),
120
+ sum(tab1[c(1,4),5])/sum(tab1[c(1,4),4])))
121
+ tab1
122
+
123
+ # Figure 1
124
+ load("Data/Fig1_Data.RData")
125
+ png("Figures/Fig1_PredProb.png",
126
+ 750,519)
127
+ ggplot(data = search.df, aes(x=Department,y=Rate,fill=Gender)) +
128
+ geom_bar(stat="identity", position=position_dodge()) +
129
+ ylab("Search Rate") +
130
+ theme_bw(base_size=15)+
131
+ theme(legend.position = "bottom") +
132
+ labs(fill="Officer Sex")+
133
+ scale_fill_grey(start = 0.25, end = .75)
134
+ dev.off()
135
+
136
+ prop.test(table(fl$of_gender,fl$search_occur))
137
+ prop.test(table(nc$of_gender,nc$search))
138
+
139
+ # Table 2
140
+ load("Data/FLSearch_Sm_OLS.RData")
141
+ load("Data/FLSearch_OLS.RData")
142
+ load("Data/NCSearch_Sm_OLS.RData")
143
+ load("Data/NCSearch_OLS.RData")
144
+ screenreg(list(nc.search,fl.search),
145
+ stars=c(0.01,0.05),
146
+ custom.coef.map = list("(Intercept)"="(Intercept)",
147
+ "factor(of_gender)1"="Female Officer",
148
+ "factor(of_race)1"="Black Officer",
149
+ "factor(race_gender)1"="White Female",
150
+ "factor(race_gender)2"="Black Male",
151
+ "factor(race_gender)3"="Black Female",
152
+ "factor(race_gender)4"="Latino Male",
153
+ "factor(race_gender)5"="Latina Female",
154
+ "investigatory" = "Investigatory Stop Purpose"),
155
+ custom.model.names = c("(1) NC Search",
156
+ "(2) FL Search"),
157
+ digits=4)
158
+
159
+ # Figure 2
160
+ fl.of.pred = predict(fl.search,
161
+ newdata = data.frame("of_gender"=c(0,1),"race_gender"=0,
162
+ "subject_age"=35,"out_of_state"=0,
163
+ "investigatory"=1,
164
+ "officer_years_of_service"=6,
165
+ "of_race"=0,"officer_age"=39,
166
+ "hour_of_day"=15,
167
+ "month"="05","year"=2013,
168
+ "county_name"="Orange County"),
169
+ type="response",se.fit=T)
170
+ nc.of.pred = predict(nc.search,
171
+ newdata = data.frame("of_gender"=c(0,1),
172
+ "race_gender"=0,
173
+ "subject_age"=36,
174
+ "investigatory"=1,
175
+ "Officer_Years_of_Service"=10.25,
176
+ "of_race"=0,"month"="01",
177
+ "year"=2019,"CMPD_Division"="South Division"),
178
+ type="response",se.fit=T)
179
+
180
+
181
+
182
+ pred.df = data.frame("Department" = c("Charlotte Police Department",
183
+ "Charlotte Police Department",
184
+ "Florida Highway Patrol",
185
+ "Florida Highway Patrol"),
186
+ "Gender" = c("Male","Female","Male","Female"),
187
+ "Predict" = c(nc.of.pred$fit,
188
+ fl.of.pred$fit),
189
+ "Lower"=c(nc.of.pred$fit-1.96*nc.of.pred$se.fit,
190
+ fl.of.pred$fit-1.96*fl.of.pred$se.fit),
191
+ "Upper"=c(nc.of.pred$fit+1.96*nc.of.pred$se.fit,
192
+ fl.of.pred$fit+1.96*fl.of.pred$se.fit))
193
+
194
+ png("Figures/Fig2_PredProb.png",
195
+ 900,514)
196
+ ggplot(data = pred.df, aes(x=Gender,y=Predict)) +
197
+ geom_point(size=4) +
198
+ geom_errorbar(aes(ymin = Lower, ymax = Upper),
199
+ width=.2,size = 0.75,
200
+ position=position_dodge(.9)) +
201
+ ylab("Expected Probbility of a Search") +
202
+ xlab("Officer Sex") +
203
+ theme_bw(base_size=15) +facet_wrap(~Department)
204
+ dev.off()
205
+
206
+ pred.df$Predict[1]/pred.df$Predict[2]
207
+ pred.df$Predict[3]/pred.df$Predict[4]
208
+
209
+ # Table 3
210
+ tab3 = data.frame("Officer Gender"=c("Male","Female"),
211
+ "Searches"=table(fl$of_gender[!is.na(fl$search_occur)],
212
+ fl$search_occur[!is.na(fl$search_occur)])[,2],
213
+ "Contraband"=table(fl$of_gender[!is.na(fl$search_occur)],
214
+ fl$contra[!is.na(fl$search_occur)])[,2],
215
+ "Contraband Hit Rate"=table(fl$of_gender[!is.na(fl$search_occur)],
216
+ fl$contra[!is.na(fl$search_occur)])[,2]/
217
+ table(fl$of_gender[!is.na(fl$search_occur)],
218
+ fl$search_occur[!is.na(fl$search_occur)])[,2],
219
+ "Difference"=c((table(fl$of_gender[!is.na(fl$search_occur)],
220
+ fl$contra[!is.na(fl$search_occur)])[,2]/
221
+ table(fl$of_gender[!is.na(fl$search_occur)],
222
+ fl$search_occur[!is.na(fl$search_occur)])[,2])[1]-
223
+ (table(fl$of_gender[!is.na(fl$search_occur)],
224
+ fl$contra[!is.na(fl$search_occur)])[,2]/
225
+ table(fl$of_gender[!is.na(fl$search_occur)],
226
+ fl$search_occur[!is.na(fl$search_occur)])[,2])[2],NA))
227
+ tab3
228
+ prop.test(table(fl$of_gender[fl$search_occur==1],
229
+ fl$contra[fl$search_occur==1]))
230
+
231
+ # Table 4
232
+ load("Data/FlContra_OLS.RData")
233
+ load("Data/FlSearchRate_OLS.RData")
234
+ load("Data/FlStopRate_OLS.RData")
235
+ screenreg(list(fl.contra,contra.search.rate.reg,contra.stop.rate.reg),
236
+ stars=c(0.01,0.05),
237
+ custom.coef.map = list("(Intercept)"="(Intercept)",
238
+ "factor(of_gender)1"="Female Officer",
239
+ "factor(of_race)1"="Black Officer",
240
+ "factor(race_gender)1"="White Female",
241
+ "factor(race_gender)2"="Black Male",
242
+ "factor(race_gender)3"="Black Female",
243
+ "factor(race_gender)4"="Latino Male",
244
+ "factor(race_gender)5"="Latina Female",
245
+ "investigatory" = "Investigatory Stop Purpose"),
246
+ custom.model.names = c("(1) Contra|Search",
247
+ "(2) Hit Rate, per 10 Searches",
248
+ "(3) Hit Rate, per 100 Stops"),
249
+ digits=4)
250
+
251
+ ###
252
+ ### 3. Appendix A: Full Regression Results
253
+ ###
254
+
255
+ screenreg(list(nc.search,fl.search,
256
+ fl.contra,contra.search.rate.reg,contra.stop.rate.reg),
257
+ stars=c(0.01,0.05),
258
+ custom.coef.map = list("(Intercept)"="(Intercept)",
259
+ "factor(of_gender)1"="Female Officer",
260
+ "factor(of_race)1"="Black Officer",
261
+ "officer_age"="Officer Age",
262
+ "factor(of_age)2"="Officer Age: 30-64",
263
+ "factor(of_age)3"="Officer Age: 65+",
264
+ "officer_years_of_service"="Officer Years of Service",
265
+ "Officer_Years_of_Service"="Officer Years of Service",
266
+ "factor(of_exper)1"="Experienced Officer",
267
+ "factor(race_gender)1"="White Female",
268
+ "factor(race_gender)2"="Black Male",
269
+ "factor(race_gender)3"="Black Female",
270
+ "factor(race_gender)4"="Latino Male",
271
+ "factor(race_gender)5"="Latina Female",
272
+ "subject_age"="Driver Age",
273
+ "factor(driver_age)2"="Driver Age: 30-64",
274
+ "factor(driver_age)3"="Driver Age: 65+",
275
+ "investigatory" = "Investigatory Stop Purpose",
276
+ "out_of_state"="Out of State"),
277
+ custom.model.names = c("(1)","(2)",
278
+ "(3)","(4)","(5)"),
279
+ digits=3)
280
+
281
+ ###
282
+ ### 4. Appendix B: Alternative Test of Differences in Search and Contraband Hit Rates
283
+ ###
284
+
285
+ # Florida
286
+ fl$stop = 1
287
+ fl$of_exper = ifelse(fl$officer_years_of_service>=
288
+ mean(fl$officer_years_of_service,na.rm=T),1,0)
289
+ fl$of_age = ifelse(fl$officer_age<30,1,
290
+ ifelse(fl$officer_age>64,3,2))
291
+ fl$driver_age = ifelse(fl$subject_age<30,1,
292
+ ifelse(fl$subject_age>64,3,2))
293
+ fl$hour_of_day=as.numeric(fl$hour_of_day)
294
+ fl$tod = ifelse(fl$hour_of_day<3,1,
295
+ ifelse(fl$hour_of_day<6,2,
296
+ ifelse(fl$hour_of_day<9,3,
297
+ ifelse(fl$hour_of_day<12,4,
298
+ ifelse(fl$hour_of_day<15,5,
299
+ ifelse(fl$hour_of_day<18,6,
300
+ ifelse(fl$hour_of_day<21,7,8)))))))
301
+
302
+ fl.ag = aggregate(fl[!is.na(fl$search_occur),c("stop","search_occur","contra")],
303
+ by = list(fl$tod[!is.na(fl$search_occur)],
304
+ fl$officer_race[!is.na(fl$search_occur)],
305
+ fl$officer_sex[!is.na(fl$search_occur)],
306
+ fl$of_exper[!is.na(fl$search_occur)],
307
+ fl$race_gender[!is.na(fl$search_occur)],
308
+ fl$driver_age[!is.na(fl$search_occur)],
309
+ fl$out_of_state[!is.na(fl$search_occur)],
310
+ fl$investigatory[!is.na(fl$search_occur)]),
311
+ sum,na.rm=T)
312
+ colnames(fl.ag) = c("tod",
313
+ "of_race","of_sex","of_exper","driver_rg",
314
+ "driver_age","out_of_state","invest",
315
+ "stop","search","contraband")
316
+ fl.ag.female = fl.ag[fl.ag$of_sex=="female",]
317
+ colnames(fl.ag.female)[c(3,9:11)] = c("female","stop.f",
318
+ "search.f","contra.f")
319
+ fl.ag.male = fl.ag[fl.ag$of_sex=="male",]
320
+ colnames(fl.ag.male)[c(3,9:11)] = c("male","stop.m",
321
+ "search.m","contra.m")
322
+
323
+ fl.matches = merge(fl.ag.female,fl.ag.male)
324
+ min.stops = 9
325
+ table(fl.matches$stop.f>min.stops&
326
+ fl.matches$stop.m>min.stops)
327
+ min.searches = 0
328
+ table(fl.matches$search.f>min.searches&
329
+ fl.matches$search.m>min.searches)
330
+ table(fl.matches$search.f>min.searches&
331
+ fl.matches$search.m>min.searches&
332
+ fl.matches$stop.f>min.stops&
333
+ fl.matches$stop.m>min.stops)
334
+
335
+ # North Carolina
336
+ nc$stop = 1
337
+ nc$search = ifelse(nc$Was_a_Search_Conducted=="Yes",1,0)
338
+ nc$driver_age = ifelse(nc$Driver_Age<30,1,
339
+ ifelse(nc$Driver_Age>65,3,2))
340
+ nc$of_exper = ifelse(nc$Officer_Years_of_Service>=mean(nc$Officer_Years_of_Service),
341
+ 1,0)
342
+ nc.ag = aggregate(nc[,c("search","stop")],
343
+ by = list(nc$CMPD_Division,
344
+ nc$Officer_Gender,nc$Officer_Race,
345
+ nc$of_exper,
346
+ nc$race_gender,nc$driver_age,
347
+ nc$investigatory,
348
+ nc$year),
349
+ sum)
350
+ nc.ag.female = nc.ag[nc.ag$Group.2=="Female",]
351
+ colnames(nc.ag.female) = c("division","female","race","of_exper",
352
+ "driver.rg","driver_age","investigatory",
353
+ "year",
354
+ "searches.f","stops.f")
355
+ nc.ag.male = nc.ag[nc.ag$Group.2=="Male",]
356
+ colnames(nc.ag.male) = c("division","male","race","of_exper",
357
+ "driver.rg","driver_age","investigatory",
358
+ "year",
359
+ "searches.m","stops.m")
360
+
361
+
362
+ # Searches
363
+ fl.matches$sr.f = fl.matches$search.f/fl.matches$stop.f
364
+ fl.matches$sr.m = fl.matches$search.m/fl.matches$stop.m
365
+ fl.matches$cr.f = fl.matches$contra.f/fl.matches$search.f
366
+ fl.matches$cr.m = fl.matches$contra.m/fl.matches$search.m
367
+ t.test(fl.matches$sr.f[fl.matches$stop.f>min.stops&
368
+ fl.matches$stop.m>min.stops],
369
+ fl.matches$sr.m[fl.matches$stop.f>min.stops&
370
+ fl.matches$stop.m>min.stops],
371
+ paired = T)
372
+ length(fl.matches$sr.f[fl.matches$stop.f>min.stops&
373
+ fl.matches$stop.m>min.stops])
374
+ mean(fl.matches$sr.f[fl.matches$stop.f>min.stops&
375
+ fl.matches$stop.m>min.stops])
376
+ mean(fl.matches$sr.m[fl.matches$stop.f>min.stops&
377
+ fl.matches$stop.m>min.stops])
378
+
379
+ nc.matches = merge(nc.ag.female,nc.ag.male)
380
+ min.stops = 9
381
+ nc.matches$sr.f = nc.matches$searches.f/nc.matches$stops.f
382
+ nc.matches$sr.m = nc.matches$searches.m/nc.matches$stops.m
383
+ t.test(nc.matches$sr.f[nc.matches$stops.f>min.stops&
384
+ nc.matches$stops.m>min.stops],
385
+ nc.matches$sr.m[nc.matches$stops.f>min.stops&
386
+ nc.matches$stops.m>min.stops],
387
+ paired = T)
388
+
389
+ length(nc.matches$sr.f[nc.matches$stops.f>min.stops&
390
+ nc.matches$stops.m>min.stops])
391
+ mean(nc.matches$sr.f[nc.matches$stops.f>min.stops&
392
+ nc.matches$stops.m>min.stops])
393
+ mean(nc.matches$sr.m[nc.matches$stops.f>min.stops&
394
+ nc.matches$stops.m>min.stops],)
395
+
396
+ # Contraband
397
+ t.test(fl.matches$cr.f[fl.matches$search.f>min.searches&
398
+ fl.matches$search.m>min.searches&
399
+ fl.matches$stop.f>min.stops&
400
+ fl.matches$stop.m>min.stops],
401
+ fl.matches$cr.m[fl.matches$search.f>min.searches&
402
+ fl.matches$search.m>min.searches&
403
+ fl.matches$stop.f>min.stops&
404
+ fl.matches$stop.m>min.stops],
405
+ paired = T)
406
+ length(fl.matches$cr.f[fl.matches$search.f>min.searches&
407
+ fl.matches$search.m>min.searches&
408
+ fl.matches$stop.f>min.stops&
409
+ fl.matches$stop.m>min.stops])
410
+ mean(fl.matches$cr.f[fl.matches$search.f>min.searches&
411
+ fl.matches$search.m>min.searches&
412
+ fl.matches$stop.f>min.stops&
413
+ fl.matches$stop.m>min.stops])
414
+ mean(fl.matches$cr.m[fl.matches$search.f>min.searches&
415
+ fl.matches$search.m>min.searches&
416
+ fl.matches$stop.f>min.stops&
417
+ fl.matches$stop.m>min.stops])
418
+
419
+ ###
420
+ ### 5. Appendix C: Logistic Regrssion Models
421
+ ###
422
+
423
+ rm(list = ls())
424
+
425
+ load("Data/FlContra_Logit.RData")
426
+ load("Data/FLSearch_Logit.RData")
427
+ load("Data/NCSearch_Logit.RData")
428
+
429
+ texreg(list(nc.search,fl.search,fl.contra),
430
+ stars=c(0.01,0.05),
431
+ custom.coef.map = list("(Intercept)"="(Intercept)",
432
+ "factor(of_gender)1"="Female Officer",
433
+ "factor(of_race)1"="Black Officer",
434
+ "factor(of_race)2"="Latinx Officer",
435
+ "factor(of_race)3"="Asain/Pacific Islander Officer",
436
+ "factor(of_race)4"="Other Race Officer",
437
+ "officer_age"="Officer Age",
438
+ "officer_years_of_service"="Officer Years of Service",
439
+ "Officer_Years_of_Service"="Officer Years of Service",
440
+ "factor(race_gender)1"="White Female",
441
+ "factor(race_gender)2"="Black Male",
442
+ "factor(race_gender)3"="Black Female",
443
+ "factor(race_gender)4"="Latino Male",
444
+ "factor(race_gender)5"="Latina Female",
445
+ "subject_age"="Driver Age",
446
+ "investigatory" = "Investigatory Stop Purpose",
447
+ "out_of_state"="Out of State"),
448
+ custom.model.names = c("(1) NC Search",
449
+ "(2) FL Search",
450
+ "(3) FL Contra|Search"),
451
+ digits=4)
452
+
453
+ ###
454
+ ### 6. Appendix C: Fixed Effects
455
+ ###
456
+
457
+ rm(list = ls())
458
+
459
+ load("Data/FLSearch_OLS_FE.RData")
460
+ load("Data/FlContra_OLS_FE.RData")
461
+ load("Data/FlSearchRate_OLS_FE.RData")
462
+ load("Data/FlStopRate_OLS_FE.RData")
463
+
464
+ texreg(list(fl.search,
465
+ fl.contra,
466
+ contra.search.rate.reg,
467
+ contra.stop.rate.reg),
468
+ stars=c(0.01,0.05),
469
+ custom.coef.map = list("(Intercept)"="(Intercept)",
470
+ "factor(of_gender)1"="Female Officer",
471
+ "factor(of_race)1"="Black Officer",
472
+ "officer_age"="Officer Age",
473
+ "factor(of_age)2"="Officer Age: 30-64",
474
+ "factor(of_age)3"="Officer Age: 65+",
475
+ "officer_years_of_service"="Officer Years of Service",
476
+ "Officer_Years_of_Service"="Officer Years of Service",
477
+ "factor(of_exper)1"="Experienced Officer",
478
+ "factor(race_gender)1"="White Female",
479
+ "factor(race_gender)2"="Black Male",
480
+ "factor(race_gender)3"="Black Female",
481
+ "factor(race_gender)4"="Latino Male",
482
+ "factor(race_gender)5"="Latina Female",
483
+ "subject_age"="Driver Age",
484
+ "factor(driver_age)2"="Driver Age: 30-64",
485
+ "factor(driver_age)3"="Driver Age: 65+",
486
+ "investigatory" = "Investigatory Stop Purpose",
487
+ "out_of_state"="Out of State"),
488
+ custom.model.names = c("(1) Search",
489
+ "(2) Contra|Search",
490
+ "(3) Hit Rate, per 10 Searches",
491
+ "(4) Hit Rate, per 100 Stops"),
492
+ digits=4)
493
+
494
+ ###
495
+ ### 7. Appendix D: Interaction Models
496
+ ###
497
+
498
+ rm(list = ls())
499
+
500
+ # Table 1. Officer Experience
501
+ load("Data/FLSearch_Exper_OLS.RData")
502
+ load("Data/NCSearch_Exper_OLS.RData")
503
+ load("Data/FlContra_Exper_OLS.RData")
504
+ load("Data/FlSearchRate_Exper_OLS.RData")
505
+ load("Data/FlStopRate_Exper_OLS.RData")
506
+
507
+ texreg(list(nc.search.exper,fl.search.exper,fl.contra.exper,
508
+ contra.search.rate.exper,contra.stop.rate.exper),
509
+ stars=c(0.05,0.01),
510
+ custom.coef.map = list("factor(of_gender)1"="Female Officer",
511
+ "officer_years_of_service"="Officer Years of Service",
512
+ "Officer_Years_of_Service"="Officer Years of Service",
513
+ "factor(of_exper)1"="Experienced Officer",
514
+ "factor(of_gender)1:officer_years_of_service"="Female Officer * Exper.",
515
+ "factor(of_gender)1:Officer_Years_of_Service"="Female Officer * Exper.",
516
+ "factor(of_gender)1:factor(of_exper)1"="Female Officer * Exper."),
517
+ digits = 3)
518
+
519
+ # Table 2. Prop Female
520
+ load("Data/FLSearch_Prop_OLS.RData")
521
+ load("Data/FlContra_Prop_OLS.RData")
522
+
523
+ texreg(list(fl.search.prop,fl.contra.prop),
524
+ stars=c(0.05,0.01),
525
+ custom.coef.map = list("factor(of_gender)1"="Female Officer",
526
+ "female.prop"="Female Proportion of Proximate Force",
527
+ "factor(of_gender)1:female.prop"="Female Officer * Female Prop."),
528
+ digits = 3)
529
+
530
+ # Table 3. Stop Type
531
+ load("Data/FLSearch_StopType_OLS.RData")
532
+ load("Data/NCSearch_StopType_OLS.RData")
533
+ load("Data/FlContra_StopType_OLS.RData")
534
+ load("Data/FlSearchRate_StopType_OLS.RData")
535
+ load("Data/FlStopRate_StopType_OLS.RData")
536
+
537
+ texreg(list(nc.search.st,fl.search.st,fl.contra.st,
538
+ contra.search.rate.st,contra.stop.rate.st),
539
+ stars=c(0.05,0.01),
540
+ custom.coef.map = list("(Intercept)"="(Intercept)",
541
+ "factor(of_gender)1"="Female Officer",
542
+ "factor(of_race)1"="Black Officer",
543
+ "officer_age"="Officer Age",
544
+ "factor(of_age)2"="Officer Age: 30-64",
545
+ "factor(of_age)3"="Officer Age: 65+",
546
+ "officer_years_of_service"="Officer Years of Service",
547
+ "Officer_Years_of_Service"="Officer Years of Service",
548
+ "factor(of_exper)1"="Experienced Officer",
549
+ "factor(race_gender)1"="White Female",
550
+ "factor(race_gender)2"="Black Male",
551
+ "factor(race_gender)3"="Black Female",
552
+ "factor(race_gender)4"="Latino Male",
553
+ "factor(race_gender)5"="Latina Female",
554
+ "subject_age"="Driver Age",
555
+ "factor(driver_age)2"="Driver Age: 30-64",
556
+ "factor(driver_age)3"="Driver Age: 65+",
557
+ "investigatory" = "Investigatory Stop Purpose",
558
+ "out_of_state"="Out of State"),
559
+ digits = 3)
560
+
561
+ # Table 4. Driver Characteristics
562
+ load("Data/FLInter_Search.RData")
563
+ load("Data/FLInter_Contra.RData")
564
+ load("Data/FLStopRate_Inter_OLS.RData")
565
+ load("Data/FLSearchRate_Inter_OLS.RData")
566
+ load("Data/NCInter_Search.RData")
567
+
568
+ texreg(list(nc.search.inter,fl.search.inter,fl.contra.inter,
569
+ contra.search.rate.inter,contra.stop.rate.inter),
570
+ stars=c(0.01,0.05),
571
+ custom.coef.map = list("factor(of_gender)1"="Female Officer",
572
+ "factor(subject_female)1"="Female Driver",
573
+ "factor(of_race)1"="Black Officer",
574
+ "factor(of_race)2"="Latinx Officer",
575
+ "factor(subject_race2)1"="Black Driver",
576
+ "factor(subject_race2)2"="Latinx Driver",
577
+ "factor(of_gender)1:factor(subject_female)1"="Female Officer*Driver",
578
+ "factor(of_race)1:factor(subject_race2)1"="Black Officer*Driver",
579
+ "factor(of_race)2:factor(subject_race2)1"="Latinx Officer*Black Driver",
580
+ "factor(of_race)1:factor(subject_race2)2"="Black Officer*Latinx Driver",
581
+ "factor(of_race)2:factor(subject_race2)2"="Latinx Officer* Driver"),digits=3)
582
+
583
+ ###
584
+ ### 8. Appendix E: A Conservative Test with the Charlotte Police Department
585
+ ###
586
+
587
+ load("Data/NorthCarolina.RData")
588
+
589
+ table(nc$year)
590
+
591
+ nc.search16 = lm(search~factor(race_gender)+subject_age+
592
+ investigatory+
593
+ factor(of_race)+
594
+ factor(of_gender)+Officer_Years_of_Service+
595
+ factor(month)+
596
+ factor(CMPD_Division),
597
+ data=nc,subset=nc$year==2016)
598
+ nc.search17 = lm(search~factor(race_gender)+subject_age+
599
+ investigatory+
600
+ factor(of_race)+
601
+ factor(of_gender)+Officer_Years_of_Service+
602
+ factor(month)+
603
+ factor(CMPD_Division),
604
+ data=nc,subset=nc$year==2017)
605
+ nc.search19 = lm(search~factor(race_gender)+subject_age+
606
+ investigatory+
607
+ factor(of_race)+
608
+ factor(of_gender)+Officer_Years_of_Service+
609
+ factor(month)+
610
+ factor(CMPD_Division),
611
+ data=nc,subset=nc$year==2019)
612
+ nc.search20 = lm(search~factor(race_gender)+subject_age+
613
+ investigatory+
614
+ factor(of_race)+
615
+ factor(of_gender)+Officer_Years_of_Service+
616
+ factor(month)+
617
+ factor(CMPD_Division),
618
+ data=nc,subset=nc$year==2020)
619
+ texreg(list(nc.search16,nc.search17,nc.search19,nc.search20),
620
+ omit.coef = "Division*|month*",
621
+ custom.coef.map = list("(Intercept)"="(Intercept)",
622
+ "factor(of_gender)1"="Female Officer",
623
+ "factor(of_race)1"="Black Officer",
624
+ "Officer_Years_of_Service"="Officer Years of Service",
625
+ "investigatory"="Investigatory Stop",
626
+ "factor(race_gender)1"="White Female",
627
+ "factor(race_gender)2"="Black Male",
628
+ "factor(race_gender)3"="Black Female",
629
+ "subject_age"="Driver Age"),
630
+ stars=c(0.01,0.05))
108/replication_package/Codebook.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13005b9b5345b06738031cbc739cd7d498e0a522225906eabc134f6524848295
3
+ size 100640
108/replication_package/Data/CMPD_Employee_Demographics-2.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85af7b553d7ac37b8a36be9f42f1a16b3dcb4b7b5b1e104d7e799a0162bf8717
3
+ size 102070
108/replication_package/Data/FLInter_Contra.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e51490c9a53f92a300708b5ca2095e71d9d941e8381192e743414ec146e516d6
3
+ size 11259261
108/replication_package/Data/FLInter_Search.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98eaf6c3979cdfc1d254e1bf93748477ed3bead57f7c197eb35557461007563a
3
+ size 2359133801
108/replication_package/Data/FLSearch_Exper_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd30c101c09a686ed202bee900a75ef7f7fb3feae40c5079433dac3907f3921b
3
+ size 2362469120
108/replication_package/Data/FLSearch_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1514156c43a7f692d134890d25b99bc985748700f54f540c0ba3ff26df68661
3
+ size 2342885016
108/replication_package/Data/FLSearch_OLS_FE.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbda980fede0640cec254d207f62567d61be8a194ef1b4abb59a6eed958c3f17
3
+ size 178632280
108/replication_package/Data/FLSearch_Prop_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd626b7947c497060e2ac5da415424c0851d990b1bbf8fd923b7f83bfd402f0d
3
+ size 2366944781
108/replication_package/Data/FLSearch_Sm_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2791ea705faa50c55af91d210f5bd2c40ba9ef1fb4f843f885be05cacdfa8723
3
+ size 46668689
108/replication_package/Data/FLSearch_StopType_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d510581a50fca4f503989fa258784e47d2dbcc6bcfaddce012947c381f6fb8e
3
+ size 1254399142
108/replication_package/Data/FL_Aggregated-2.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23f19f7224610075cc557a54c48efe0d22f8e05128d20e457aded8542ac3c269
3
+ size 2359133
108/replication_package/Data/Fig1_Data-2.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01489db42bc824d3c335d2992cc2928436c2a8295965d12f02a09842f6317232
3
+ size 227
108/replication_package/Data/FlContra_Exper_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a02d19de084d28d8fa52873eca1435a6a732f9e50c6a652758f2bfca9fbf3987
3
+ size 11198225
108/replication_package/Data/FlContra_Logit.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:409491c82c65d415ff8ef172232ca9a85a747f7b4fef9485830bd9e7bd1c29d4
3
+ size 106097885
108/replication_package/Data/FlContra_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c785e578736bbf092441b223d2a48aa961502f516c2345823ec3f435a646770
3
+ size 11001727
108/replication_package/Data/FlContra_OLS_FE.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adc0aba7bda58b3bb62478a4a98a3cb7a75829c46bf176577ab0cd49d05fbda7
3
+ size 1159630
108/replication_package/Data/FlContra_Prop_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b9a91cc6baffa3d93740d5912bf7bd07ee213d265e005b6b88799457bcc0605
3
+ size 11495685
108/replication_package/Data/FlContra_Sm_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:369f25d63c672d16149118b8cfed934599bcb9bd1e066ddb447496c188e9a6e4
3
+ size 156422
108/replication_package/Data/FlContra_StopType_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6d48289c9409301da705fd8dc8c6d924174e4af1a9b5706ca46556d3070c1ee
3
+ size 9424568
108/replication_package/Data/FlSearchRate_Exper_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79d926b7a6f669d70c89cc90fd8346959aabc2b6dfd9e5c470f0b663ce245b1c
3
+ size 430999
108/replication_package/Data/FlSearchRate_Inter_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:331839e877eb0a2bf8b6c607d08dd85f4aadab9e4c044cb4322d8547fdccd5b5
3
+ size 681337
108/replication_package/Data/FlSearchRate_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f15fefc7c3a7e6472994b9afe5db12d8c59827abaf50cccad1d20f9c66e854de
3
+ size 664257
108/replication_package/Data/FlSearchRate_OLS_FE.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90c3648d7ac25842d2aaa1809a2427ab28d5558238fbbccf9d7c2f9427a1b60f
3
+ size 715255
108/replication_package/Data/FlSearchRate_StopType_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08093ceb38bc2d279479419d0670d772f906c998318f557352df08bb92302dac
3
+ size 301641
108/replication_package/Data/FlStopRate_Exper_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48b7b5bbf65240de3142009835bf0a3665ce97c3543d20609554e6365820aa4c
3
+ size 13569388
108/replication_package/Data/FlStopRate_Inter_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0d73e384cb9b7cc1e37e8e3672fea953045583ff5310394d74451a04f4dd67a
3
+ size 20515466
108/replication_package/Data/FlStopRate_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85bd75b8f6f9bf0144874d7dd572a1776a7ac4b3a604582899eccd2075aab288
3
+ size 16239663
108/replication_package/Data/FlStopRate_OLS_FE.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:590e1874612b47f5fb3cac2b0812b2f0546688f55276abcaa587ad35923fcd6f
3
+ size 31466666
108/replication_package/Data/FlStopRate_StopType_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:006a600056a5370ac28e5c6e06803f01d574354c51e4e95c3c7792ebc3200dc9
3
+ size 6480541
108/replication_package/Data/FloridaLarge.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcb05c938fd8f1c03d10c470fa7798c0b96fe1ba479feffcb5122bb88ffc91fc
3
+ size 162447547
108/replication_package/Data/FloridaSmall.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:348f5b056d7723726c70ee0bd06272d23c6aaa8d7a086e76b4f886c8a41bbaff
3
+ size 93337267
108/replication_package/Data/NCInter_Search.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23ee3c85f8545c110d7141dc5993c9ca088c51feb16dfe7045e1f6d0a8e49c94
3
+ size 46453455
108/replication_package/Data/NCSearch_Exper_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c97944fa5c25668536b01df9667a86e8c61728724357667c3c9b3a51cb359697
3
+ size 35200154
108/replication_package/Data/NCSearch_Logit.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:195ae828e4eca39ffc3b12d04c45bb53461edfa5c1877804b77602d462b27f5b
3
+ size 50326018
108/replication_package/Data/NCSearch_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43cc344a20dc09fbb4afad6735fee82fb158c6340c133bf2936f3aa1c462bb8d
3
+ size 34108717
108/replication_package/Data/NCSearch_Sm_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1073b27ffcebae9427223fe79419f75bf62958e9566a73028f8050d3d0713fd
3
+ size 220878
108/replication_package/Data/NCSearch_StopType_OLS.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98d7812f9bb368364fefeb839b0b3f86019f2d56ffc3585a92e4fa71d58ba810
3
+ size 17400474
108/replication_package/Data/NorthCarolina.RData ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a6642b5def9756e49bd99c4ce1610048fd27bf5617c78aec3d658a5ca431422
3
+ size 2821239
108/replication_package/Data/Officer_Traffic_Stops_Original.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:804a8c1ac803fcac70319b898e0a75dbbc705da548cb26cc0641b287aa184def
3
+ size 17327975
108/replication_package/Data/Officer_Traffic_Stops_Update.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d2e1b647ba0739d6ff13e28ba0378ef4af8b8cc41f584038e39761a48a574c8
3
+ size 20913993
108/replication_package/Data/fl_statewide_2019_08_13.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd8bd39618a6f670122723eeafa9d11ba7f19065eda4fadb38ffdacc838f16db
3
+ size 1974334914
108/replication_package/Figures/Fig1_PredProb.png ADDED

Git LFS Details

  • SHA256: b04006e4b3822e53a76a827780a000d2ceb711c7c0915fb54cd1e6bdf6158d01
  • Pointer size: 130 Bytes
  • Size of remote file: 22.3 kB
108/replication_package/Figures/Fig2_PredProb.png ADDED

Git LFS Details

  • SHA256: b4bd4a047496b785d9499a301333c4ce883102d777bec8cf35f9e7e3048cfde1
  • Pointer size: 130 Bytes
  • Size of remote file: 31.4 kB
108/replication_package/OutputFiles/Step1_MainAnalysisAndData.html ADDED
The diff for this file is too large to render. See raw diff
 
108/replication_package/OutputFiles/Step2_AppendixAnalysis.html ADDED
The diff for this file is too large to render. See raw diff
 
108/replication_package/OutputFiles/Step3_TablesAndFigures.html ADDED
The diff for this file is too large to render. See raw diff