# Similarity in the problems of using OLS with clustered and spatially autocorrelated data?

I understand that using a regression method that assumes independence of observations with an outcome that is either clustered or (positively) spatially autocorrelated can give misleading results. Let's focus on the common problem of downwardly biased standard errors used in significance testing of regression coefficients.

I can cite publications that say don't do use methods that assume independence with this data. I can use statistics to assess the potential for problems (e.g. Moran's I, the Intraclass Correlation Coefficient) and I can use not-too-complicated models to guard against possible problems (e.g., spatial error or lag model, a multilevel model).

What I can't do is tell a questioner exactly how these problems come into being--or where they enter into the equation, as it were.

I have read that, effectively, in both cases, the variance of the clustered or autocorrelated variable is underestimated with methods that assume independence.

It seems like the assumption of independence entails the assumption that certain possibly important things are equal to zero or one--e.g., ICC≠0, or a matrix of spatial weights where the weights are not all 1 (or a semivariogram that is not flat). [edit: in fact, it seems possible that the correlations between observations could be represented with a weights matrix that reflected distance in once case and class membership in another]

Am I conceptually correct about this seeming similarity--or are there differences in the way these two data types affect significance testing of regression coefficients?

Is there is general and relatively simple way to demonstrate both effects with math or example?

If you know of a publication that does this, that would be great, but it would have to be a pedagogical one. I am not a statistician. Thanks.

Nothing like asking a question to get you thinking about how to answer it. Ward & Gleditsch show a calculation provided by Cressie which relates spatial correlation to overstating the sample size (Ward & Gleditsch 2008). Of course the sample size is also overestimated when calculating Level 2 effects in a multilevel model, and this can be computed with the design effect, at least when groups are the same size.

A t value for regression coefficient b is the ratio of b to its standard error, which can be expressed as SQRT ( (1-r^2) * ( Σ(y-[y-bar])/(N-2) ) ). That's the variance of Y (multiplied by the unexplained variance). So one way of unifying the explanation of uncontrolled spatial autocorrelation and uncontrolled intraclass-correlation on the results of a method like ordinary least squares, at least for sigificance testing of regression coefficients) is to talk about in terms of overstated sample size.

Is this reasonable?

• Now I think I am wrong again. Other formulas I have seen for the standard error b use x, the predictor variable, not the outcome (or am I just looking at algebraically equivalent formulations?). The sample size, however, which can be overestimated in both the case of clustering and spatial autocorrelation of the outcome, is present in the denominator of the formula for the standard error of the coefficient. Thus, overstated sample size leads to understated standard errors and larger values of the test statistic than are warranted.
– Rico
Commented Jan 25, 2018 at 15:36
• Your standard error formula above is for the correlation coefficient..not for the regression coefficient. In the case of regression, it would bias your estimate of the residual mean square (which is used in calculating the standard error) and, especially, your critical values (because the degrees of freedom may be inflated if the data are autocorrelated). Commented Jan 25, 2018 at 17:11
• @coreydevinanderson thank you! can you point me to a publication where I can see that?
– Rico
Commented Jan 26, 2018 at 14:09

One of the most basic tests of the regression coefficient is based on a $t$-statistic, where the null hypothesis is that the value of the regression coefficient is zero.

$$t={b-\beta_0\over SE_b}$$

Recall that for a $t$-distribution, the number of degrees of freedom is equal to sample size ($n$) minus one. Because positive spatial autocorrelation results in pseudoreplication, you think your sample size is larger than it really is and this inflates your degrees of freedom. As the number of degrees of freedom increases, the area under the tails of the $t$-distribution decreases, and it takes a relatively smaller $t$-score to reject the null hypothesis at a given level (such as 0.05), potentially resulting in a Type I statistical error.

Spatial autocorrelation also inflates the estimate of the $t$-score itself because the standard error is underestimated. This is easy to see when calculating the standard error for Pearson's product moment correlation coefficient:

$$SE_r=\sqrt{1-r^2\over n-2}$$

For the regression coefficient, the estimate of the standard error is calculated by the square root of the residual mean square divided by sums of squares of $X$, and here the sample size enters in the estimation of the mean squared residual:

$$SE_b=\sqrt{\frac{MS_\text{residual}}{\sum_i (X_i - \bar{X})^2}}$$

rather than directly into the calculation of the standard error.

If you are interested in the subject of spatial autocorrelation and its effect on statistical testing, most sources eventually lead back to the classic monographs by Cliff and Ord (1973) and Cliff and Ord (1981).

Cliff AD, Ord JK (1973) Spatial autcorrelation. Pion, London, England.

Cliff AD, Ord JK (1981) Spatial processes: models and applications. Pion, London, England.