# Measuring spatial correlation using a distance-decay model

I asked a question on the GIS StackExchange site, regarding working spatial correlation/regression in QGIS, and how to implement this in software: Calculating spatial correlation between features from two separate layers in QGIS

But I wanted to ask a question here that is focused more on the validity of the mathematical model that I was thinking of using, and get some ideas about how I could improve it to develop a more realistic model. (The question there was mostly based around software tools/implementation - here I'm curious to learn more about the math).

I am working with the following two datasets:

1. locations of military bases in the continental US & their corresponding troop levels

2. nationwide data on rates of violent crime by town/city

I am trying to determine whether the presence of large numbers of active duty military troops in an area is spatially correlated with higher/lower levels of violent crime. That is, are the areas surrounding large military bases more/less violent, on average, than areas that are not near military bases? I am not necessarily looking for a causal relationship - just to see if there is a significant correlation.

I was thinking of using some sort of "gravity" based model that would conceptually look something like this:

In this diagram X,Y,Z represent military bases. a,b,c,d each represent cities (each of which has a violence rate field in its attribute table). The gradient around the bases represents the field of influence, which decreases exponentially with distance away from the base centroid. Larger troop presence equates to a stronger influence relative a smaller base. Each city will be assigned a score based on summing the magnitude of all of the "forces" from all surrounding bases whose influence radius they lay in.

The algorithm that I was thinking of using to do this is as follows:

• For each military base m, assign a weight W(m) based on the # of troops

• Select all cities within an r-mile radius of m, and for each city c (where r is some arbitrary maximum threshold distance)

1. Compute the distance D(m,c), from base m to city c

2. Add the distance decayed score S for base m to the total score for city c where $$S = \frac{W(m)}{D(m,c)^{2}}$$

• Each city now has two values associated with it:

1. The total "troop presence score" all military bases

2. The per capita "violent crime rate" for that city

• Finally, I would calculate the Pearson correlation coefficient for these two variables to see if there is a strong correlation between these two figures.

My questions are :

• Are there any glaring problems with this approach from a statistical perspective?
• Which alternative mathematical models could I use to determine if there is a spatial correlation between military bases and violent crime rates, using the data sets described above? What would be the pros/cons of each?

Thanks!

• Also, please note that I'm an undergrad student doing this for a GIS class project, so my understanding of statistics (especially spatial statistics) is rather basic - limited to two quarters of introductory stats . I'm sure there are issues with the approach outlined above, but please try to explain the problems with it in relatively simple language (i.e. don't assume advanced knowledge). Also, I realize that many other factors influence violence rates - so I'd like to emphasize again that I'm not (necessarily) looking for a causal relationship here, just trying to measure correlation. Dec 7, 2015 at 1:37
• Yep this is a reasonable approach to the problem. Not sure what else you want someone to say. Dec 7, 2015 at 2:05
• Hi Andy - thanks for your response. I just needed someone with more experience to verify that this made sense before I took the time to write the code, or to provide alternative methods if it didn't make sense. As I said, my knowledge of statistics is really basic, so while this approach intuitively made sense to me, I realize that there are a lot of "gotchas" with statistics and thought I might be overlooking something. Dec 7, 2015 at 2:53

$$C=\beta_1+\beta_2T+\epsilon$$
Admittedly you lose something here in that the regression model is not symmetrical between C and T (whereas calculating a correlation coefficient between two variables treats them symmetrically). What you gain, however, is that, the estimated value of the parameter $\beta_2$ provides a measure of the strength of the relation between C and T. Moreover the coefficient of determination ($R^2$) from the regression provides a measure of how much of the total variation in C is associated with variation in T.