HW2 Answers

PAF 573

YOUR NAME Elaine MacPherson

load libraries and read in data

library(tidyverse)
library(stargazer)
library(GGally)
library(jtools)

# read in data
URL <- "https://raw.githubusercontent.com/spiromar/files/main/paf573/data-crime-levitt.csv"
crime <- read.csv( URL )

1a

Estimate, report, and graph the results of a regression of murder on police in 1992. (Be sure to save your regression results to an object with a different name.) Interpret the coefficient on sworn.

ANSWER: The coefficient on “sworn” indicates that with each additional sworn police officer, there is an increase in murder crimes at a coefficient unit of .045. The P value is very small (.0012) which indicates the relationship is statistically significant.

Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.06682 3.01534 2.344 0.0229 * sworn 0.04225 0.01234 3.423 0.0012 ** — Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 9.654 on 53 degrees of freedom (4 observations deleted due to missingness) Multiple R-squared: 0.1811, Adjusted R-squared: 0.1656 F-statistic: 11.72 on 1 and 53 DF, p-value: 0.0012

1b

How likely is it that you would have observed this estimate if the null hypothesis were actually true?
ANSWER: It would have been a .0012 % chance we would have observed this is there were no statistic relationship (null hypothesis).

1c

Do the results make sense? In your opinion, what might be responsible for the results?
ANSWER: Seeing the positive relationship implies that with additional police officers, more murders are committed. It seems counterintuitive that an increase in police officers would lead to more murders, unless these two are correlated, but not causal. For example: is there another factor that leads to both an increase in the murder rate as well as a increase in the amount of sworn officers in cities in the United States?

Problem 2

Now, let’s incorporate some additional control variables into the model. Specifically, add the covariates listed in Table 3 of Levitt’s paper (i.e., all but the police variable, as this is already in your model). These are the variables you will need: x_unemp x_welfare x_education x_a15_24 x_black x_femhea. (You will notice that the paper uses log transformations (ln) of the variables. Don’t worry about that for now, nor the fact that your estimates will not look the same as Table 3. We will deal with that in the a future class.)

2a

Why might it be important to include these particular controls in a model of city murder rates? What are they intended to capture?
ANSWER: unemployment, education level, and poverty disproportionately experienced by people of color are strong predictors for crime in cities. Citing the presence of police alone as a predictive factor in increasing or decreasing crime would not paint the whole picture, since crime proportionately happens in cities with proportionately more unemployment, poverty, low education levels, and single-parent households.

2b

With the inclusion of these control variables, the model is now a multiple regression model. Estimate the model for 1992. Report the regression table (using summ) and interpret the coefficient on sworn. Be sure to comment on how likely is it that you would have observed each estimate if the null hypothesis were actually true.
ANSWER: The coefficient on sworn shows a .044 correlation, with a tiny P-value that is within conditional significance. This means that there is a correlation with a tiny likelihood (.00673) that this would be observed if the null hypothesis were true.

2c

How does the coefficient on sworn compare from those in the simple univariate model? Why do they differ?
ANSWER: Singlevariate model:0.04225 coefficient with a p-value of 0.0012 ** Multivariate model: .044573 coefficient iwth a p-value of .00673.

it is possible that the variable of sworn officers is highly correlated with other variables we have now introduced into our analysis, such as unemployment. That could change hte coefficient on sworn officers because those two variables are interacting in some way in the regression.

2d

Visualize the results of the 1992 results using effect_plot. For what range of values of sworn do you have the most confidence? For what range the least?
ANSWER: Most confidence: 30-60; lease confidence: 20-25