# How to estimate measurement error on spatially autocorrelated gridded data when aggregating grid cells

I would like to estimate the measurement error when aggregating (via arithmetic mean) gridded spatial data. The goal is to come up with the mean elevation (or some other spatially continuous variable) +/- some measure of uncertainty for each aggregated region. However, spatial data is more often than not spatially autocorrelated which may influence the measurement error. This leads to the following questions:

1/ How can I assess the magnitude of the influence of spatial autocorrelation on the standard deviation of the aggregated data?

2/ Are there other statistics that can or should be used to estimate measurement error?

I offer the following example as a starting point of discussion. For simplicity I’m presenting a one dimensional dataset.

x <-runif(100,0,100)
xa <- x
# Simulate 1-D spatial autocorrelation
for (i in 4:100) {
x[i] <-  mean(xa[(i-4):i])
}


The black text in the figure is the arithmetic mean and the green text is the standard deviation.

• "Appropriate" for what purpose? There's nothing the matter with computing the arithmetic mean within blocks for aggregation, whether or not there's correlation. Many uses of the mean (and other statistics) do not depend on an independence assumption. Questions arise only when you are making inferences about those means using procedures that require accurate estimates of sampling variances. – whuber Oct 11 '11 at 20:41
• @whuber, thanks for the clarification regarding the use of the arithmetic mean with dependent data. Now regarding standard deviation, this link is what raised a flag (albeit I'm not very conversant with mathematical notations, so I may be misinterpreting the page). Can the bias affect estimations of elevation uncertainty (i.e. elevation is 1200m +/- 20m)? – MannyG Oct 11 '11 at 22:30
• It's a good flag to raise. In the case of DEM uncertainty, the question is not whether the elevations are correlated--they are--but whether the measurement errors are correlated. In fact, the errors are likely correlated too (and correlated with the elevations). The point of that page is that if you try to estimate the error variance from a small local patch, you will likely bias it low (sometimes quite low). However, over sufficiently large regions the bias (due to spatial correlation) will disappear. (Other biases may remain.) Perhaps this might help you refine your question. – whuber Oct 11 '11 at 22:52
• BTW, It's nice to see you on our site! – whuber Oct 11 '11 at 22:52
• Thanks @whuber for helping refine the question. I've limited the discussion to the standard deviation. – MannyG Oct 12 '11 at 1:34