Although I have found on StackOverflow all answers I ever had on GIS matters using R, ArcGIS and QGIS in the past, I am currently faced with one question I can't find an answer to online.

For my final dissertation project, I am working on water quality data based on sampled I have collected across an aquifer. I am exploring faecal contamination patterns, so I am mostly interested in faecal bacteria count and my method (using R) is as follows:


2. Stepwise logistic regression for dimensionality reduction. That's because my dataset is very wide given that I only have 97 samples, and I am trying to predict a contaminated/non-contaminated status, not a level of contamination (hence logistic over linear regression) --> the best possible result is still a rather poor model with low predictive power and no spatial autocorrelation found in residuals (that excludes using a Geographically weighted Regression)

3. Geospatial modelling: still trying to run some form of interpolation --> I tried Moran's I, LISA, and even Mantel test (distance matrix against faecal contamination matrix) and found no spatial autocorrelation for the variable of interest. --> I used IDW, because unlike Kriging it doesn't make assumptions about spatial autocorrelation

4. Hierarchical clustering (unsupervised machine learning) to still extract some form of classification from this complex dataset despite the difficulty to predict anything with supervised methods tested above.

My main question right now is about step 3. Given that I found NO spatial autocorrelation, am I right to still go ahead and run an IDW interpolation? Or should I just stop my analysis right there and say: look, my result is "no significant result from a geospatial point of view"? I have read so many articles, tutorials and handbooks, that this useful question Choosing IDW vs Kriging interpolation summarizes pretty well, but it doesn't really lift my doubts.

@Spacedman has provided a very useful answer.

My sampling pattern was indeed quite poor due to more or less limited access to groundwater sources across the study area.

Initially I was testing a new real-time method for faecal matter detection, but it turns out it just doesn't work in this area and is shockingly uncorrelated with the actual contamination. That's what I am finding in step 1. So my study has become an exploration of contamination patterns across the aquifer. In step 2 I try to work out whether other hydrochemical parameters I registered would work as decent predictors and if I can build a regression model. Turns out: not really. So in step 3 I was hoping that I could still build some sort of classification of the study area and display contaminated vs non-contaminated areas. In step 4 I rely on Machine Learning, and I use Gower distance (which combines all parameters into a single distance metric) to classify different "families" of contamination, if that make sense?

Could @Spacedman clarify what he means by "you have demonstrated that a non-spatially correlated model is adequate"?

Does it mean I should just stick with my logistic regression or the clustering?


IDW does make assumptions about spatial autocorrelation. Any spatial smoothing does. The output of an IDW is a smoothed surface in 2d, and if you check that for spatial autocorrelation, it will have it. What IDW doesn't have is a statistical model for spatial autocorrelation - its a mechanical method for producing maps of the mean. Having no spatial autocorrelation means that two measurements, no matter how close they are, are uncorrelated - have zero correlation between them, so any spatial smoothing is going to be misleading.

What's missing from your question is any statement of what the research problem is - are you trying to produce a predictive model of contamination at unmeasured locations? In which case you've shown that a non-spatially correlated model is adequate.

To expand on that point, consider a classical linear regression problem. Your model is that Y = beta.X + N(0,s^2) where those "error" terms, N(0,s^2) are independent. You then fit the model to your data (by maximum-likelihood which works out as least-squares) and you are left with a bunch of residuals. Those residuals should be normally distributed with the same variance (s^2) and be independent. If you plot them against X and discover +ve residuals at low and high X and -ve residuals for medium X then that looks like your data isn't linear, and your independence assumption looks shaky, and that affects your conclusions about beta, the relationship between X and Y, which is presumably the thing you are interested in.

If there's no evidence of correlation in your residuals in a linear model then great, write it up and publish! Your model adequately describes your data, and your beta coefficient and its standard error are a measure of the relationship between X and Y given the assumptions of the model.

The thing about spatial data is that we a-priori assume spatial correlation because we expect nearby things to be more similar than distant things, even when we account for local covariates. If you can eliminate that, which you seem to have done, then you can fit a non-spatial model to your data, and write it up (with a section on how you showed there was no spatial correlation problem).

Its likely that any spatial correlation is at very short range and your sampling scheme has missed this. If you tried kriging, for example, your variogram would probably be flat with distance. A flat variogram is equivalent to a constant s^2 in the linear model case, with no distance dependence.

It all boils down to what your research question is. If someone says "sample the wells in this county, and produce a map of bacteria presence over this county", and there's no spatial correlation, and you have no other covariates (like depth of well, or soil type, or anything) then your map is going to be a flat surface of "number of positive wells"/"total number of wells sampled". Without any evidence of spatial autocorrelation then even if you dig a well right next to an existing well, that's your best guess that it will come up positive. After digging a few adjacent wells you might revise this opinion, but without the data, you cant!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.