Some U.S. states have enacted laws that allow citizens to carry concealed weapons. These laws are known as “shall-issue” laws because they instruct local authorities to issue a concealed weapons permit to all applicants who are citizens, are mentally competent, and have not been convicted of a felony. (Some states have some additional restrictions.) Proponents argue that if more people carry concealed weapons, crime will decline because criminals will be deterred from attacking other people. Opponents argue that crime will increase because of accidental or spontaneous use of the weapons. In this exercise, you will analyze the effect of concealed weapons laws on violent crimes. On the text website, http://www.pearsonglobaleditions.com, you will find the data file Guns, which contains a balanced panel of data from the 50 U.S. states plus the District of Columbia for the years 1977 through 1999.3 A detailed description is given in Guns_Description, available on the website.
rm(list=ls())
library(openxlsx)
## Warning: package 'openxlsx' was built under R version 4.3.3
library(lmtest)
library(sandwich)
library(plm)
library(stargazer)
id <- "1-AI4B_1UVrT6jNwfgGm8vmosGjqsF_aF"
guns <- read.xlsx(sprintf("https://docs.google.com/uc?id=%s&export=download",id)
,sheet=1,startRow=1,colNames=TRUE,rowNames=FALSE)
str(guns)
## 'data.frame': 1173 obs. of 13 variables:
## $ year : num 77 78 79 80 81 82 83 84 85 86 ...
## $ vio : num 414 419 413 448 470 ...
## $ mur : num 14.2 13.3 13.2 13.2 11.9 10.6 9.2 9.4 9.8 10.1 ...
## $ rob : num 96.8 99.1 109.5 132.1 126.5 ...
## $ incarc_rate: num 83 94 144 141 149 183 215 243 256 267 ...
## $ pb1064 : num 8.38 8.35 8.33 8.41 8.48 ...
## $ pw1064 : num 55.1 55.1 55.1 54.9 54.9 ...
## $ pm1029 : num 18.2 18 17.8 17.7 17.7 ...
## $ pop : num 3.78 3.83 3.87 3.9 3.92 ...
## $ avginc : num 9.56 9.93 9.88 9.54 9.55 ...
## $ density : num 0.0746 0.0756 0.0762 0.0768 0.0772 ...
## $ stateid : num 1 1 1 1 1 1 1 1 1 1 ...
## $ shall : num 0 0 0 0 0 0 0 0 0 0 ...
- Estimate (1) a regression of ln(vio) against shall and (2) a regression of ln(vio) against shall, incarc_rate, density, avginc, pop, pb1064, pw1064, and pm1029.
guns$lvio <- log(guns$vio)
fit_1 <- lm(lvio~shall, data=guns)
summary(fit_1)
##
## Call:
## lm(formula = lvio ~ shall, data = guns)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.28477 -0.42748 0.04655 0.42172 1.84504
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.13492 0.02072 296.13 <2e-16 ***
## shall -0.44296 0.04203 -10.54 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6174 on 1171 degrees of freedom
## Multiple R-squared: 0.08664, Adjusted R-squared: 0.08586
## F-statistic: 111.1 on 1 and 1171 DF, p-value: < 2.2e-16
coeftest(fit_1, vcov=vcovHC, type="HC3")
##
## t test of coefficients:
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.134919 0.019309 317.7199 < 2.2e-16 ***
## shall -0.442965 0.047636 -9.2989 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_2 <- lvio~shall+incarc_rate+density+avginc+pop+pb1064+pw1064+pm1029
fit_2 <- lm(model_2, data=guns)
summary(fit_2)
##
## Call:
## lm(formula = model_2, data = guns)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.72300 -0.26620 0.04767 0.30478 1.05998
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.9817391 0.5433938 5.487 5.01e-08 ***
## shall -0.3683869 0.0325674 -11.312 < 2e-16 ***
## incarc_rate 0.0016126 0.0001072 15.050 < 2e-16 ***
## density 0.0266885 0.0131680 2.027 0.042915 *
## avginc 0.0012051 0.0077802 0.155 0.876930
## pop 0.0427098 0.0025588 16.691 < 2e-16 ***
## pb1064 0.0808526 0.0166514 4.856 1.36e-06 ***
## pw1064 0.0312005 0.0083776 3.724 0.000205 ***
## pm1029 0.0088709 0.0107737 0.823 0.410458
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4277 on 1164 degrees of freedom
## Multiple R-squared: 0.5643, Adjusted R-squared: 0.5613
## F-statistic: 188.4 on 8 and 1164 DF, p-value: < 2.2e-16
coeftest(fit_2, vcov=vcovHC, type="HC3")
##
## t test of coefficients:
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.98173913 0.61364232 4.8591 1.34e-06 ***
## shall -0.36838694 0.03498511 -10.5298 < 2.2e-16 ***
## incarc_rate 0.00161263 0.00019205 8.3972 < 2.2e-16 ***
## density 0.02668848 0.01501123 1.7779 0.075681 .
## avginc 0.00120512 0.00738057 0.1633 0.870324
## pop 0.04270984 0.00321202 13.2969 < 2.2e-16 ***
## pb1064 0.08085258 0.02027420 3.9880 7.08e-05 ***
## pw1064 0.03120050 0.00982459 3.1758 0.001534 **
## pm1029 0.00887088 0.01231721 0.7202 0.471545
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
a.i. Interpret the coefficient on shall in regression (2). Is this estimate large or small in a real-world sense?
[Ans] The coefficient is \(-0.368\), which suggests that shall-issue laws reduce violent crime by \(36\%\). This is a large effect.
a.ii. Does adding the control variables in regression (2) change the estimated effect of a shall-issue law in regression (1) as measured by statistical significance? As measured by the real-world significance of the estimated coefficient?
[Ans] The coefficient in (1) is \(-0.443\); in (2) it is \(-0.368\). Both are highly statistically significant. Adding the control variables results in a small drop (about \(8\%\)) in the coefficient.
a.iii. Suggest a variable that varies across states but plausibly varies little—or not at all—over time and that could cause omitted variable bias in regression (2).
[Ans] There are several examples. Here are two: Attitudes towards guns and crime, and quality of police and other crime-prevention programs.
- Do the results change when you add fixed state effects? If so, which set of regression results is more credible, and why?
fit_b <- plm(model_2, data=guns, index=c('stateid', 'year'), effect="individual", model="within")
coeftest(fit_b, vcov=vcovHC(fit_b, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
##
## t test of coefficients:
##
## Estimate Std. Error t value Pr(>|t|)
## shall -4.6141e-02 4.1424e-02 -1.1139 0.265572
## incarc_rate -7.1008e-05 2.4973e-04 -0.2843 0.776201
## density -1.7229e-01 1.4778e-01 -1.1659 0.243910
## avginc -9.2037e-03 1.2874e-02 -0.7149 0.474827
## pop 1.1525e-02 1.4604e-02 0.7892 0.430187
## pb1064 1.0428e-01 3.2956e-02 3.1643 0.001597 **
## pw1064 4.0861e-02 1.3382e-02 3.0535 0.002315 **
## pm1029 -5.0273e-02 2.0568e-02 -2.4442 0.014672 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
[Ans] By adding state fixed effects, the coefficient on shall falls to \(-0.046\), a large reduction in the coefficient from (2). Evidently there was important omitted variable bias in (2). The estimate is not statistically significantly different from zero (using robust standard errors).
- Do the results change when you add fixed time effects? If so, which set of regression results is more credible, and why?
fit_c <- plm(model_2, data=guns, index=c('stateid', 'year'), effect="twoways", model="within")
coeftest(fit_c, vcov=vcovHC(fit_c, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
##
## t test of coefficients:
##
## Estimate Std. Error t value Pr(>|t|)
## shall -2.7994e-02 4.0030e-02 -0.6993 0.4845
## incarc_rate 7.5994e-05 2.0457e-04 0.3715 0.7104
## density -9.1555e-02 1.2102e-01 -0.7565 0.4495
## avginc 9.5859e-04 1.6347e-02 0.0586 0.9532
## pop -4.7545e-03 1.5382e-02 -0.3091 0.7573
## pb1064 2.9186e-02 4.9097e-02 0.5945 0.5523
## pw1064 9.2500e-03 2.3522e-02 0.3933 0.6942
## pm1029 7.3326e-02 5.2194e-02 1.4049 0.1603
[Ans] The coefficient decreases to \(-0.028\), indicating that it is insignificantly different from zero. It intuitively makes more sense to incorporate both time fixed effects and state fixed effects into the model. As previously discussed, we can readily identify variables that vary across states but plausibly remain relatively constant over time (state-fixed effects). Moreover, there may exist national-level trends that vary across years but exhibit minimal variation across states (time-fixed effects).
- Repeat the analysis using ln(rob) and ln(mur) in place of ln(vio).
For \(ln(rob)\),
guns$lrob <- log(guns$rob)
model_rob <- lrob~shall+incarc_rate+density+avginc+pop+pb1064+pw1064+pm1029
## OLS ##
fit_rob_ols <- lm(model_rob, data=guns)
fit_rob_ols_r <- coeftest(fit_rob_ols, vcov=vcovHC, type="HC3")
## Panel with State Fixed Effects ##
fit_rob_fe1 <- plm(model_rob, data=guns, index=c('stateid', 'year'), effect="individual", model="within")
fit_rob_fe1_r <- coeftest(fit_rob_fe1, vcov=vcovHC(fit_rob_fe1, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
## Panel with both State Fixed Effects and Time Fixed Effects ##
fit_rob_fe2 <- plm(model_rob, data=guns, index=c('stateid', 'year'), effect="twoways", model="within")
fit_rob_fe2_r <- coeftest(fit_rob_fe2, vcov=vcovHC(fit_rob_fe2, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
## Summary ##
stargazer(fit_rob_ols_r, fit_rob_fe1_r, fit_rob_fe2_r, column.labels=c("ols","fe(state)", "fe(twoways)"), type="text", digits=3, omit.stat=c("f", "ser"))
##
## ===========================================
## Dependent variable:
## -------------------------------
##
## ols fe(state) fe(twoways)
## (1) (2) (3)
## -------------------------------------------
## shall -0.529*** -0.008 0.027
## (0.051) (0.055) (0.051)
##
## incarc_rate 0.001*** -0.0001 0.00003
## (0.0002) (0.0003) (0.0003)
##
## density 0.091*** -0.186 -0.045
## (0.016) (0.169) (0.196)
##
## avginc 0.041*** -0.018 0.014
## (0.009) (0.022) (0.025)
##
## pop 0.078*** 0.016 0.00002
## (0.006) (0.029) (0.027)
##
## pb1064 0.102*** 0.112** 0.014
## (0.027) (0.051) (0.083)
##
## pw1064 0.028** 0.027* -0.013
## (0.014) (0.016) (0.032)
##
## pm1029 0.027* 0.011 0.105
## (0.015) (0.029) (0.072)
##
## Constant 0.904
## (0.895)
##
## ===========================================
## ===========================================
## Note: *p<0.1; **p<0.05; ***p<0.01
For \(ln(mur)\),
guns$lmur <- log(guns$mur)
model_mur <- lmur~shall+incarc_rate+density+avginc+pop+pb1064+pw1064+pm1029
## OLS ##
fit_mur_ols <- lm(model_mur, data=guns)
fit_mur_ols_r <- coeftest(fit_mur_ols, vcov=vcovHC, type="HC3")
## Panel with State Fixed Effects ##
fit_mur_fe1 <- plm(model_mur, data=guns, index=c('stateid', 'year'), effect="individual", model="within")
fit_mur_fe1_r <- coeftest(fit_mur_fe1, vcov=vcovHC(fit_mur_fe1, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
## Panel with both State Fixed Effects and Time Fixed Effects ##
fit_mur_fe2 <- plm(model_mur, data=guns, index=c('stateid', 'year'), effect="twoways", model="within")
fit_mur_fe2_r <- coeftest(fit_mur_fe2, vcov=vcovHC(fit_mur_fe2, type="HC4", cluster="group")) # robust SE (clustered by group standard-errors)
## Summary ##
stargazer(fit_mur_ols_r, fit_mur_fe1_r, fit_mur_fe2_r, column.labels=c("ols","fe(state)", "fe(twoways)"), type="text", digits=3, omit.stat=c("f", "ser"))
##
## ===========================================
## Dependent variable:
## -------------------------------
##
## ols fe(state) fe(twoways)
## (1) (2) (3)
## -------------------------------------------
## shall -0.313*** -0.061* -0.015
## (0.036) (0.037) (0.038)
##
## incarc_rate 0.002*** -0.0004 -0.0001
## (0.0002) (0.0005) (0.0004)
##
## density 0.040*** -0.671 -0.544
## (0.012) (0.460) (0.362)
##
## avginc -0.077*** 0.024 0.057***
## (0.009) (0.016) (0.017)
##
## pop 0.042*** -0.026 -0.032
## (0.004) (0.021) (0.021)
##
## pb1064 0.131*** 0.031 0.022
## (0.019) (0.084) (0.080)
##
## pw1064 0.047*** 0.010 -0.0005
## (0.009) (0.013) (0.020)
##
## pm1029 0.066*** 0.039* 0.069
## (0.014) (0.022) (0.042)
##
## Constant -2.486***
## (0.620)
##
## ===========================================
## ===========================================
## Note: *p<0.1; **p<0.05; ***p<0.01
[Ans] The quantitative results are similar to the results using violent crimes: there is a significant and large estimated effect of concealed weapons laws in the OLS regression where no fixed effect is included. The significant results are spurious and suffer from omitted variable bias.
- In your view, what are the most important remaining threats to the internal validity of this regression analysis?
[Ans] There is potential two-way causality between this year’s incarceration rate and the number of crimes. Because this year’s incarceration rate is much like last year’s rate, there is a potential two-way causality problem. There are similar two-way causality issues relating crime and \(shall\).
- Based on your analysis, what conclusions would you draw about the effects of concealed weapons laws on these crime rates?
[Ans] The most credible results are given by the two-way fixed effects model. The \(95\%\) confidence interval for \(\beta_{Shall}\) is \(-11.0\%\) to \(5.3\%\). This includes \(\beta_{Shall}=0\). Thus, there is no statistically significant evidence that concealed weapons laws have any effect on crime rates.