I will use same dataset that i used last week that is stop and frisk data from 2018. But this time instead of finding likelihood of someone being arrested, i am interested in the likelihood of weapon(firearms) been found and use some new as well as some last week independent variables.Therefore, my binary dependent variable will be weapon found or not.
Reminder of data description:
Every time a police officer stops a person in NYC, the officer is require to fill out a form recording the details of the stop. The forms were filled out by hand and manually entered into an NYPD database. When the forms became electronic, database are available for download for public . Each row of the data set represent a stop by NYPD officer. Dataset also contain variable such as the age, race, weight, height of the person stopped, if a person was frisked (when an officer pass the hands over someone in a search for hidden weapons, drugs, or other items and the location of the stop.
library(readxl)
# Reading the excel data
sqf<- read_excel("C:/Users/Afzal Hossain/Documents/A.Spring 2019/SOC 712/HW/HW4/sqf_2018.xlsx")
dim(sqf)
[1] 11008 83
library(dplyr)
#Keeping the variable that i am interested in.
sq<-select(sqf, 'STOP_FRISK_ID',"WEAPON_FOUND_FLAG",'SUMMONS_ISSUED_FLAG','OTHER_WEAPON_FLAG','SUSPECT_ARRESTED_FLAG','FRISKED_FLAG','SEARCHED_FLAG','SUSPECT_REPORTED_AGE':'SUSPECT_BODY_BUILD_TYPE')
# Lets look the Data
head(sq)
# Dealing with null values
sq$SUSPECT_SEX <- as.character(sq$SUSPECT_SEX)
sq$SUSPECT_SEX[sq$SUSPECT_SEX == "(null)"] <- NA
sq$SUSPECT_RACE_DESCRIPTION<-as.character(sq$SUSPECT_RACE_DESCRIPTION)
sq$SUSPECT_RACE_DESCRIPTION[sq$SUSPECT_RACE_DESCRIPTION == "(null)"]<- NA
sq$SUSPECT_BODY_BUILD_TYPE<-as.character(sq$SUSPECT_BODY_BUILD_TYPE)
sq$SUSPECT_BODY_BUILD_TYPE[sq$SUSPECT_BODY_BUILD_TYPE== "(null)"]<- NA
# Taking records that are only complete
sq<-sq[complete.cases(sq), ]
dim(sq)
[1] 10776 13
I can see that it reduce the data size by deleting incomplete dataset. Original data set had 11008 record, now we have 10776 record. This is acceptable since this data was collected by hand, therefore missing value are expected.
I will eecode the race and race variable in order to easy understanding and create bigger groups.
# Recoding Variable for bodu type
sq$SUSPECT_BODY_BUILD_TYPE[sq$SUSPECT_BODY_BUILD_TYPE=='EA' |
sq$SUSPECT_BODY_BUILD_TYPE=='HEA' |
sq$SUSPECT_BODY_BUILD_TYPE=='THN'|
sq$SUSPECT_BODY_BUILD_TYPE=='U' |
sq$SUSPECT_BODY_BUILD_TYPE=='XXX'] <- "BIG/ATHLETETIC"
sq$SUSPECT_BODY_BUILD_TYPE[sq$SUSPECT_BODY_BUILD_TYPE=='MED' |
sq$SUSPECT_BODY_BUILD_TYPE=='THN'] <- "Small"
# Recoding Variable for Race
sq$SUSPECT_RACE_DESCRIPTION[sq$SUSPECT_RACE_DESCRIPTION=='ASIAN / PACIFIC ISLANDER' |
sq$SUSPECT_RACE_DESCRIPTION=='BLACK HISPANIC'|
sq$SUSPECT_RACE_DESCRIPTION=='WHITE HISPANIC' |
sq$SUSPECT_RACE_DESCRIPTION=='AMERICAN INDIAN/ALASKAN NATIVE'] <- "LATINO/OTHER"
# Making appropriate data type
sq$OTHER_WEAPON_FLAG<- as.factor(sq$OTHER_WEAPON_FLAG)
sq$FRISKED_FLAG<- as.factor(sq$FRISKED_FLAG)
sq$WEAPON_FOUND_FLAG<- as.factor(sq$WEAPON_FOUND_FLAG)
sq$SUSPECT_REPORTED_AGE<- as.double(sq$SUSPECT_REPORTED_AGE)
sq$SUSPECT_ARRESTED_FLAG<- as.factor(sq$SUSPECT_ARRESTED_FLAG)
sq$SUSPECT_SEX<- as.factor(sq$SUSPECT_SEX)
sq$SUSPECT_RACE_DESCRIPTION<- as.factor(sq$SUSPECT_RACE_DESCRIPTION)
sq$SUSPECT_BODY_BUILD_TYPE<- as.factor(sq$SUSPECT_BODY_BUILD_TYPE)
sq$SUSPECT_HEIGHT<- as.double(sq$SUSPECT_HEIGHT)
sq$SUSPECT_WEIGHT<- as.double(sq$SUSPECT_WEIGHT)
# Creating New Variables
sq <- sq %>%
mutate(weapon_found =as.integer(WEAPON_FOUND_FLAG),arrast = as.integer(SUSPECT_ARRESTED_FLAG),Frisk = as.integer(FRISKED_FLAG))
sq <- sq %>%
select(weapon_found ,arrast, Frisk,SEARCHED_FLAG,SUSPECT_SEX,SUSPECT_REPORTED_AGE,SUSPECT_RACE_DESCRIPTION, everything())
head(sq)
As before,I will now recode the variable to 0/1 instead of Y/N for my newly created variables which are Weapon_Found arrast, and Frisk. Also Filter any missing value.
sq <- sq %>% filter(!is.na(SUMMONS_ISSUED_FLAG),!is.na(SUSPECT_REPORTED_AGE),!is.na(SUSPECT_HEIGHT),!is.na(SUSPECT_WEIGHT),!is.na(SUSPECT_SEX),!is.na(weapon_found))%>%
mutate(arrasted = sjmisc::rec(arrast, rec = "1=0; 2=1"), Frisked = sjmisc::rec(Frisk, rec = "1=0; 2=1"),
Weapon_Found = sjmisc::rec(weapon_found, rec = "1=0; 2=1")) %>%
select(Weapon_Found,WEAPON_FOUND_FLAG,arrasted, SUSPECT_ARRESTED_FLAG, Frisked,FRISKED_FLAG,
SUSPECT_SEX,SUSPECT_REPORTED_AGE,
SUSPECT_RACE_DESCRIPTION, everything()) %>%
select(-weapon_found)
sq$arrasted<- as.factor(sq$arrasted)
sq$Weapon_Found<- as.factor(sq$Weapon_Found)
sq$Frisked<- as.factor(sq$Frisked)
head(sq)
Lets create our first simple model where we predict using our bineary dependent variable Weapon_Found and a independent continuas variable Age of the suspect stop by officer, SUSPECT_REPORTED_AGE
m0 <- glm(Weapon_Found ~ SUSPECT_REPORTED_AGE, family = 'binomial', data = sq)
summary(m0)
Call:
glm(formula = Weapon_Found ~ SUSPECT_REPORTED_AGE, family = "binomial",
data = sq)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.4742 -0.4439 -0.4381 -0.4340 2.2019
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.364897 0.090012 -26.273 <2e-16 ***
SUSPECT_REPORTED_AGE 0.002777 0.002793 0.995 0.32
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6037.9 on 9788 degrees of freedom
Residual deviance: 6037.0 on 9787 degrees of freedom
AIC: 6041
Number of Fisher Scoring iterations: 5
From \(m_0\), the coefficient is positive,but very small.So we can say that as people get older, chances of weapon found slightly increase. From the \(Y-intercept\), I can say that when age is zero, the log odd of weapon been found is \(-2.365\). From the slope value, I can say that for every one-unit increase of age, the log odds of weopen found increases by \(0.002777\). Furthermore, from the \(Z\) \(value\) we can say that it less than one standard deviation way from zero therefore it is not statistically significant
Improving Model:
m1 <- glm(Weapon_Found ~ SUSPECT_RACE_DESCRIPTION + SUSPECT_SEX + SUSPECT_REPORTED_AGE +SUSPECT_BODY_BUILD_TYPE,family = 'binomial', data = sq)
summary(m1)
Call:
glm(formula = Weapon_Found ~ SUSPECT_RACE_DESCRIPTION + SUSPECT_SEX +
SUSPECT_REPORTED_AGE + SUSPECT_BODY_BUILD_TYPE, family = "binomial",
data = sq)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.5079 -0.4657 -0.4572 -0.3726 2.7185
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.168466 0.189114 -16.754 < 2e-16 ***
SUSPECT_RACE_DESCRIPTIONLATINO/OTHER -0.013652 0.075153 -0.182 0.855851
SUSPECT_RACE_DESCRIPTIONWHITE -0.524010 0.144500 -3.626 0.000287 ***
SUSPECT_SEXMALE 0.908596 0.171753 5.290 1.22e-07 ***
SUSPECT_REPORTED_AGE 0.003876 0.002828 1.371 0.170492
SUSPECT_BODY_BUILD_TYPESmall -0.086086 0.073550 -1.170 0.241824
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6037.9 on 9788 degrees of freedom
Residual deviance: 5983.7 on 9783 degrees of freedom
AIC: 5995.7
Number of Fisher Scoring iterations: 5
We can see that log odds of finding weapon on Male significantly higher \(.9086\) and log odds of finding weapon on white people is \(-.524\) which is significantly lower then latino/Other, \(-.014\).
Keep Improving Model:
m2 <- glm(Weapon_Found ~ SUSPECT_SEX +SUSPECT_REPORTED_AGE + SUSPECT_RACE_DESCRIPTION+SUSPECT_BODY_BUILD_TYPE+ SUMMONS_ISSUED_FLAG + SEARCHED_FLAG, family = 'binomial', data = sq)
summary(m2)
Call:
glm(formula = Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE +
SUSPECT_RACE_DESCRIPTION + SUSPECT_BODY_BUILD_TYPE + SUMMONS_ISSUED_FLAG +
SEARCHED_FLAG, family = "binomial", data = sq)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.7797 -0.4955 -0.2515 -0.2415 3.1062
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.2682551 0.2058873 -20.731 < 2e-16 ***
SUSPECT_SEXMALE 0.8715929 0.1763243 4.943 7.69e-07 ***
SUSPECT_REPORTED_AGE -0.0004927 0.0029936 -0.165 0.869267
SUSPECT_RACE_DESCRIPTIONLATINO/OTHER -0.0768001 0.0790678 -0.971 0.331389
SUSPECT_RACE_DESCRIPTIONWHITE -0.5376049 0.1496365 -3.593 0.000327 ***
SUSPECT_BODY_BUILD_TYPESmall -0.0332901 0.0773328 -0.430 0.666848
SUMMONS_ISSUED_FLAGY 0.1266151 0.1841361 0.688 0.491694
SEARCHED_FLAGY 2.2429199 0.0870336 25.771 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6037.9 on 9788 degrees of freedom
Residual deviance: 5113.1 on 9781 degrees of freedom
AIC: 5129.1
Number of Fisher Scoring iterations: 6
From our improve model, we can see that log odds of finding weapon significantly increase, \(2.268\) when people are been searched. Male, withe race remain significant as describe in last model.
Adding all Variable To Improving Model:
m3 <- glm(Weapon_Found ~ SUSPECT_SEX +SUSPECT_REPORTED_AGE +SUSPECT_RACE_DESCRIPTION +arrasted+Frisked+SUSPECT_HEIGHT+ SEARCHED_FLAG+SUMMONS_ISSUED_FLAG+SUSPECT_BODY_BUILD_TYPE, family = 'binomial', data = sq)
summary(m3)
Call:
glm(formula = Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE +
SUSPECT_RACE_DESCRIPTION + arrasted + Frisked + SUSPECT_HEIGHT +
SEARCHED_FLAG + SUMMONS_ISSUED_FLAG + SUSPECT_BODY_BUILD_TYPE,
family = "binomial", data = sq)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.3496 -0.4370 -0.2505 -0.1268 3.3136
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -6.099569 0.593934 -10.270 < 2e-16 ***
SUSPECT_SEXMALE 0.669505 0.184605 3.627 0.000287 ***
SUSPECT_REPORTED_AGE 0.004497 0.003180 1.414 0.157318
SUSPECT_RACE_DESCRIPTIONLATINO/OTHER -0.067425 0.082905 -0.813 0.416058
SUSPECT_RACE_DESCRIPTIONWHITE -0.428232 0.156067 -2.744 0.006071 **
arrasted1 1.697277 0.097607 17.389 < 2e-16 ***
Frisked1 1.394994 0.102591 13.598 < 2e-16 ***
SUSPECT_HEIGHT 0.093647 0.101533 0.922 0.356356
SEARCHED_FLAGY 1.204195 0.101597 11.853 < 2e-16 ***
SUMMONS_ISSUED_FLAGY 0.775567 0.194737 3.983 6.82e-05 ***
SUSPECT_BODY_BUILD_TYPESmall -0.021727 0.081055 -0.268 0.788658
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6037.9 on 9788 degrees of freedom
Residual deviance: 4613.0 on 9778 degrees of freedom
AIC: 4635
Number of Fisher Scoring iterations: 6
From this model, it is clear that log odd significant increase when they are been arrested and frisked (a police officer or other official pass the hands over)compare to those who are not arrested or frisked, \(1.698\) and \(1.394\) respectfully. Furthermore, after adding variable like arrested and frisked, summons issue became a significant coefficient with \(1.204\) positive log odds for finding weapon. Which is understandable since, if there is summon issue for an individual and he/she is arrested or frisked, it is most likely that individual was a criminal and criminal do carry weapon.
Adding Interaction To The Model:
m4 <- glm(Weapon_Found ~ SUSPECT_SEX +SUSPECT_REPORTED_AGE + Frisked+arrasted*SUSPECT_RACE_DESCRIPTION+OTHER_WEAPON_FLAG+SUMMONS_ISSUED_FLAG+ SEARCHED_FLAG+SUSPECT_BODY_BUILD_TYPE+SUSPECT_HEIGHT, family = 'binomial', data = sq)
summary(m4)
Call:
glm(formula = Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE +
Frisked + arrasted * SUSPECT_RACE_DESCRIPTION + OTHER_WEAPON_FLAG +
SUMMONS_ISSUED_FLAG + SEARCHED_FLAG + SUSPECT_BODY_BUILD_TYPE +
SUSPECT_HEIGHT, family = "binomial", data = sq)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.0035 -0.3811 -0.2218 -0.1171 3.1970
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -6.651389 0.636264 -10.454 < 2e-16 ***
SUSPECT_SEXMALE 0.927612 0.210216 4.413 1.02e-05 ***
SUSPECT_REPORTED_AGE 0.004382 0.003354 1.307 0.1914
Frisked1 1.373826 0.107728 12.753 < 2e-16 ***
arrasted1 1.974126 0.131036 15.066 < 2e-16 ***
SUSPECT_RACE_DESCRIPTIONLATINO/OTHER 0.175152 0.161018 1.088 0.2767
SUSPECT_RACE_DESCRIPTIONWHITE 0.104885 0.278406 0.377 0.7064
OTHER_WEAPON_FLAGY 4.947763 0.325996 15.177 < 2e-16 ***
SUMMONS_ISSUED_FLAGY 0.828262 0.204082 4.058 4.94e-05 ***
SEARCHED_FLAGY 1.179744 0.108300 10.893 < 2e-16 ***
SUSPECT_BODY_BUILD_TYPESmall 0.001302 0.085548 0.015 0.9879
SUSPECT_HEIGHT 0.092623 0.107211 0.864 0.3876
arrasted1:SUSPECT_RACE_DESCRIPTIONLATINO/OTHER -0.356727 0.191294 -1.865 0.0622 .
arrasted1:SUSPECT_RACE_DESCRIPTIONWHITE -0.867756 0.345354 -2.513 0.0120 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6037.9 on 9788 degrees of freedom
Residual deviance: 4188.0 on 9775 degrees of freedom
AIC: 4216
Number of Fisher Scoring iterations: 6
Adding interaction between getting arrested and race, we can see that log odds of finding weapon when arrested still significantly lower amoung white compare to latino and other race,\(-0.866\) and \(-0.355\). Therefore,we can say that getting arrested donnot influeance the log odds of findinf weapon amoung different race.Furthermore, when other weapon beside firearms found, log odds of finding firearms (weapon) significantly increase by \(4.94\). Male, withe race,geting frisked,arrested, searched and summon issue remain significant as describe in other model.
Likelihood Ratio Test:
anova(m0, m1, m2,m3,m4, test = "Chisq")
Analysis of Deviance Table
Model 1: Weapon_Found ~ SUSPECT_REPORTED_AGE
Model 2: Weapon_Found ~ SUSPECT_RACE_DESCRIPTION + SUSPECT_SEX + SUSPECT_REPORTED_AGE +
SUSPECT_BODY_BUILD_TYPE
Model 3: Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE + SUSPECT_RACE_DESCRIPTION +
SUSPECT_BODY_BUILD_TYPE + SUMMONS_ISSUED_FLAG + SEARCHED_FLAG
Model 4: Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE + SUSPECT_RACE_DESCRIPTION +
arrasted + Frisked + SUSPECT_HEIGHT + SEARCHED_FLAG + SUMMONS_ISSUED_FLAG +
SUSPECT_BODY_BUILD_TYPE
Model 5: Weapon_Found ~ SUSPECT_SEX + SUSPECT_REPORTED_AGE + Frisked +
arrasted * SUSPECT_RACE_DESCRIPTION + OTHER_WEAPON_FLAG +
SUMMONS_ISSUED_FLAG + SEARCHED_FLAG + SUSPECT_BODY_BUILD_TYPE +
SUSPECT_HEIGHT
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 9787 6037.0
2 9783 5983.7 4 53.23 7.613e-11 ***
3 9781 5113.1 2 870.67 < 2.2e-16 ***
4 9778 4613.0 3 500.02 < 2.2e-16 ***
5 9775 4188.0 3 425.08 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Form this test, we can see that model 4 which is \(m_4\) has a significantly improved based on very small P-value.
Information Criteria:
Bayesian information criterion (BIC): \[BIC = -2L + k\times log(n)\]
Akaike information criterion (AIC): \[AIC = 2(L-k)\]
library(texreg)
#screenreg(list(m0, m1, m2,m3,m4), doctype = FALSE)
htmlreg(list(m0, m1, m2,m3,m4), doctype = FALSE)
| Model 1 | Model 2 | Model 3 | Model 4 | Model 5 | ||
|---|---|---|---|---|---|---|
| (Intercept) | -2.36*** | -3.17*** | -4.27*** | -6.10*** | -6.65*** | |
| (0.09) | (0.19) | (0.21) | (0.59) | (0.64) | ||
| SUSPECT_REPORTED_AGE | 0.00 | 0.00 | -0.00 | 0.00 | 0.00 | |
| (0.00) | (0.00) | (0.00) | (0.00) | (0.00) | ||
| SUSPECT_RACE_DESCRIPTIONLATINO/OTHER | -0.01 | -0.08 | -0.07 | 0.18 | ||
| (0.08) | (0.08) | (0.08) | (0.16) | |||
| SUSPECT_RACE_DESCRIPTIONWHITE | -0.52*** | -0.54*** | -0.43** | 0.10 | ||
| (0.14) | (0.15) | (0.16) | (0.28) | |||
| SUSPECT_SEXMALE | 0.91*** | 0.87*** | 0.67*** | 0.93*** | ||
| (0.17) | (0.18) | (0.18) | (0.21) | |||
| SUSPECT_BODY_BUILD_TYPESmall | -0.09 | -0.03 | -0.02 | 0.00 | ||
| (0.07) | (0.08) | (0.08) | (0.09) | |||
| SUMMONS_ISSUED_FLAGY | 0.13 | 0.78*** | 0.83*** | |||
| (0.18) | (0.19) | (0.20) | ||||
| SEARCHED_FLAGY | 2.24*** | 1.20*** | 1.18*** | |||
| (0.09) | (0.10) | (0.11) | ||||
| arrasted1 | 1.70*** | 1.97*** | ||||
| (0.10) | (0.13) | |||||
| Frisked1 | 1.39*** | 1.37*** | ||||
| (0.10) | (0.11) | |||||
| SUSPECT_HEIGHT | 0.09 | 0.09 | ||||
| (0.10) | (0.11) | |||||
| OTHER_WEAPON_FLAGY | 4.95*** | |||||
| (0.33) | ||||||
| arrasted1:SUSPECT_RACE_DESCRIPTIONLATINO/OTHER | -0.36 | |||||
| (0.19) | ||||||
| arrasted1:SUSPECT_RACE_DESCRIPTIONWHITE | -0.87* | |||||
| (0.35) | ||||||
| AIC | 6040.97 | 5995.73 | 5129.06 | 4635.04 | 4215.96 | |
| BIC | 6055.35 | 6038.87 | 5186.58 | 4714.12 | 4316.61 | |
| Log Likelihood | -3018.48 | -2991.87 | -2556.53 | -2306.52 | -2093.98 | |
| Deviance | 6036.97 | 5983.73 | 5113.06 | 4613.04 | 4187.96 | |
| Num. obs. | 9789 | 9789 | 9789 | 9789 | 9789 | |
| p < 0.001, p < 0.01, p < 0.05 | ||||||
From both \(AIC\) and \(BIC\), we can see that models get better as their value decrease with more variable and complexity. The best performing model based on both of these metrics is Model 5 which is model \(m_4\)
library(visreg)
visreg(m4, "SUSPECT_REPORTED_AGE",scale="response",line=list(col="violetred2"),fill=list(col="midnightblue"),
xlab="Suspect Age") + theme_bw()
Conditions used in construction of plot
SUSPECT_SEX: MALE
Frisked: 1
arrasted: 0
SUSPECT_RACE_DESCRIPTION: BLACK
OTHER_WEAPON_FLAG: (null)
SUMMONS_ISSUED_FLAG: N
SEARCHED_FLAG: N
SUSPECT_BODY_BUILD_TYPE: BIG/ATHLETETIC
SUSPECT_HEIGHT: 5.7
NULL
We can see that, as age increase probability of finding weapon slightly increased as we saw in our model.
I will not use intersecting plot because my interection variables are factor( Race and arrested) not integer. Therefore, i will use visreg to check my interaction result.
visreg(m4, "SUSPECT_RACE_DESCRIPTION", by = "arrasted",scale ="response",line=list(col="darkgoldenrod1"),
fill=list(col="firebrick4"), xlab="Suspect Race")
From this graph, we can say that see that our interaction correctly mention that it is less likely that a weapon will be found in someone of white race even he/she is arrested compare to other race.
visreg(m4, "SUSPECT_SEX", by = "arrasted",scale ="response",line=list(col="brown2"),
fill=list(col="gray0"), xlab="Suspect Sex")
Male are more likely to carry weapon than female whether they were arrested or not.