Emma C. Gray
Home
Contact Emma
Example Projects
Data Viz
Emma C. Gray
Home
Contact Emma
Example Projects
Data Viz
More
  • Home
  • Contact Emma
  • Example Projects
  • Data Viz
  • Sign In
  • Create Account

  • My Account
  • Signed in as:

  • filler@godaddy.com


  • My Account
  • Sign out


Signed in as:

filler@godaddy.com

  • Home
  • Contact Emma
  • Example Projects
  • Data Viz

Account


  • My Account
  • Sign out


  • Sign In
  • My Account

Visually Representing Input and output

Actual Distribution of Violent Crime by County

Predicted Distribution of Violent Crime by County

Visually Showing Model Fit

Predicted vs Actual

How Counties Influence the Model

Evaluating Fit and Heteroskedasticity

Evaluating Fit and Heteroskedasticity

Predictive Model of Violent Crime in the United States

Predictors

The predictors which made it into the final model selection process are described below, with a brief explanation of why the predictor was included, any considerations concerning its inclusion and any special characteristics of the predictor. 

The first predictor listed in the model is region, which was included as a categorical variable with the Midwest for reference. Different regions of the United States will experience important differences in unobserved factors. They may have different cultures, politics, population demographics, levels of education etc., which the region variable attempts to account for. The Northeast contained 6.93% of counties, the Midwest 33.64%, the South 45.38%, and the West 14.04%. As shown in Table 1, all regions had statistically different levels of violent crime, except for the South and the West, which were not statistically different from one another in terms of the mean of the log of the number of violent crimes per county. Table 2 shows that all regions were statistically related to the outcome when included in a model together.

One of the most highly related social vulnerability variables was the uninsured rate. Conceptually higher levels of uninsured residents should lead to lower levels of medical care, which in turn should lead to higher levels of substance abuse, which has been shown to be positively related to violent crimes such as murder (Goldstein, 1985). Expansion of medical insurance through Medicaid has been tied to lower rates of aggravated assault, primarily through the expansion of access to substance abuse treatment (Wen, Hockenberry & Cummings, 2017; Vogler, 2017). The percent of the population that is uninsured is correlated with the percent unemployed, the percent below the poverty line and the percent without a high school diploma (r = 0.27, 0.51, 0.52 respectively.) Unsurprisingly, when variables for all these factors were included in one model, there was a high degree of collinearity and large variance inflation factors (VIF) were observed. As Table 1, shows the mean uninsured rate was 11.908 people per 100 residents. Though single regression of log violent crimes by uninsured rates, shown in Table 2, shows that violent crimes fall with higher uninsured rates, this is likely the result of confounding by population size of the county, which is negatively correlated with uninsured rate. When adjusted for log of the number of non-elderly adult residents, uninsured rate becomes positively correlated with violent crime, as is expected based on the literature. The uninsured rate has a right skew. Log transformation of the uninsured rate did not improve the model goodness of fit or residual diagnostics. 

It has long been observed that cities have higher crime rates than other places (Glaeser & Bruce, 1999; Wolf et al., 2014). Though the theories as to why this is vary greatly, the fact remains that any model of violent crime must differentiate between regions with a large metropolitan area and areas without one. The method for creating the city score is described in the methods section. Over 80% of counties received a city score of zero while only 6 counties received a city score of 3. Of these, 5 were clustered around New York City and 1 was San Francisco County, California. Los Angeles County, California and Cook County, Illinois received city scores of 2, likely because their cities are more spread out geographically. Table 1 shows that the city score is significantly and positively correlated with the log number of violent crimes in a county, as expected. City score is the one variable that was not kept in the final model after selection using Cp scores. After adjustment for all other variables included in the selection process, city score ceased to be statistically significant or meaningfully interpretable. When adjusted for all other variables, city score had a negative relationship with violent crime and p-value of 0.6764. 

Race and ethnicity are important factors in the United States. The category that one falls into correlates with many other factors, such as housing and neighborhoods, educational opportunities, discrimination, and experience with violence. In 2016, the rate of violent victimization was highest for non-Hispanic black persons in the United States (Oudekerk, 2020). Additionally, in the United States, slightly more than half of people arrested for nonfatal violent crimes are not classified as non-Hispanic White (Beck, 2018). Together, these facts indicate that the racial/ethnic makeup of a community may be an important proxy variable in predicting how much violent crime will be recorded. As Table 1 shows, the mean percent minority in a county was 22.854. Table 2 shows that the minority rate is significantly and positively correlated with log number of violent crimes. The minority rate has a right skew. Log transformation of the minority rate did not improve the model goodness of fit or residual diagnostics. 

As climate change impacts the environment, abnormally high temperatures are an increasingly important factor to consider when looking at outcomes such as violent crime (Harp, & Karnauskas, 2020). On abnormally hot day, increases in violent crime can lead to as much as 15% increase in arrests (Behrer & Bolotnyy, 2021). The impacts of heat on violent crime rates appear to be especially apparent in less well-off areas, potentially due to with how both heat and material circumstances affects our psychology (Behrer & Bolotnyy, 2021). Slightly less than half of counties (43.5%) had a mean temperature that was two degrees or more above average in July of 2016. 

The total population of a county was reduced by the population of adults over aged 65 and older and by the population of minors under age 17. Non-elderly adults were used as the population predictor variable as 88.9% of violent offenders arrested in 2016 fell into this category (Federal Bureau of Investigation, 2016). The number of non-elderly adults was log transformed to improve correlation with log violent crimes and to stabilize residuals. This log transformed variable yielded a higher Pearson correlation to log violent crimes than the log of the total population of a county. Overall, the non-elderly adult population was the strongest predictor of the number of violent crimes (after log transformations). Though area is not directly thought to be linked to violent crimes, it is a necessary adjusting variable to account for the density of the population. Area was log transformed to stabilize residuals.

Lower per capita income has been shown to be associated with higher homicide rates (Gobaurd et al., 2022). It is a good proxy for many other circumstances that may affect violent crime rates as well. Per capita income was log transformed to improve correlation with log violent crime and to stabilize residuals. This transformation is common practice due to the skewed nature of income distributions. Additionally, per capita income displayed a nonlinear correlation with violent crime, which was improved with natural log transformation. 

Final Model

ln⁡(violent)= -3.60711-0.09502(Northeast=1)+0.06127(South=1)+0.10241(West=1)+0.03417(Uninsured Rate per 100)+0.02581(Minority Rate per 100)-0.14132(Two Degrees Hotter=1)+1.31775 ln⁡(non-elderly adults))-0.64542 ln⁡(per capita income)+0.05210 ln⁡(area)-0.00136(Uninsured Rate per 100)*(Minority Rate per 100)+0.02689(Uninsured Rate per 100)*(Two Degrees Hotter=1) 

Full Report

The full report includes additional information not highlighted above. All citations are at the end. 

Gray_FinalProjectBSTT401 (pdf)Download

Copyright © 2025 Emma C. B. Gray - All Rights Reserved.

Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

DeclineAccept