## Introduction

Linear or loglinear spatial regression models are common in spatial epidemiology (Best et al. 2000). A set of ecological variables are often associated with disease rates or counts, and after a final model is derived, residuals can be visually inspected on a map for spatial clusters. For a linear model, a residual test of Moran's *I* for spatial autocorrelation can also be performed to detect spatial clustering for the unexplained regression errors. However, there is no corresponding spatial residual test of clustering for loglinear or Poisson regressions on count data, which was the challenge for the current study. The study was motivated by our inquiry into the spatial patterns of breast cancer incidents in Kentucky counties as they related to the development stage of disease at diagnosis. Breast cancer staging at diagnosis is known to be associated with socioeconomic conditions, mammography screening services, and other variables (Yabroff and Gordis 2003; Barry and Breen 2005). As socioeconomic variables are often spatially autocorrelated (e.g., poor areas tend to be clustered), we expect clustering of breast cancer to occur, at least for the early-state incidence rates. If there is no significant environmental cause of breast cancer, the clustering tendency should disappear once we introduce area socioeconomic variables.

One way to test for the existence of spatial clustering is to set up a spatial autocorrelation test, such as Moran's *I*, for Guassian or continuous data by using the permutation test of residuals for Moran's *I* in a linear regression (Cliff and Ord 1981). Converting incidence to rate, however, is often less appealing than retaining the original count of each in spatial data analysis (Griffith and Haining 2006). In addition, Moran's *I* test assumes that attribute values (e.g., disease prevalence) are either in equal probability among all the geographic units or from a single parent distribution. These assumptions are often violated in the permutation test of Moran's *I* in disease data due to heterogeneous regional populations and large variation in sparsely populated areas (Besag and Newell 1991). Although there have been several extensions of Moran's *I* to account for population heterogeneity (Oden 1995; Waldhor 1996; Assuncao and Reis 1999), none of them can include potential ecological covariates. For example, Oden proposes a test statistic that applies regional population sizes to adjust Moran's *I*. However, because of a minor modification in the null hypothesis, is no longer comparable to the original Moran's *I* (Assuncao and Reis 1999). Consequently, cannot be extended to evaluate covariates and spatial autocorrelation simultaneously.

A spatial logit association model can include potential explanatory variables and identify high-value and low-value clusters (Lin 2003; Zhang and Lin 2006). It does not, however, have a global measure of spatial clustering that would complement the modeling process for local spatial logit associations. Jacqmin-Gadda et al. (1997) propose a homogeneity score test of a generalized linear model that can also include potential explanatory variables in a correlation test. The test is based on residuals in generalized linear models, a design that its authors claimed to correspond to the permutation test of linear regression errors. However, as we will later show, the test does not adjust variance for heterogeneous population sizes. In addition, because its weight matrix is not necessarily spatially constructed, its null hypothesis is not necessarily spatial independence as one would assume when applying Moran's *I* test. Consequently, it is not straightforward to use the score test in a generalized linear model that includes spatial correlation and heterogeneity.

The purpose of this article is to extend the permutation test of residuals of the Moran's *I* autocorrelation to generalized linear models so that spatial analysts can directly test for spatial clustering while controlling for potential ecological covariates. While no one has proposed either deviance or Pearson residuals in the spatial statistic literature, Waller and Gotway (2004) point out a form close to Pearson residuals as a way to account for inflated variance in Moran's *I* under heteroskedasticity. In this article, we demonstrate that permutation tests are applicable to Pearson or deviance residuals of loglinear models in the same way as in the traditional permutation test of residuals for Moran's *I*. In the remaining sections of the article, we first review the permutation test of Moran's *I* by using regression residuals and then reformulate it in the context of Poisson data by using the Pearson and deviance residuals of a loglinear model. We then evaluate their statistical properties under the null hypothesis of spatial independence in a series of simulated patterns and apply the Pearson residual Moran's *I* test and deviance residual Moran's *I* test to breast cancer incidence in Kentucky counties that include potential ecological covariates.