[R-sig-Geo] Why can you not calculate Moran's i for glm() residuals?

Jenn Barrett jsbarret at sfu.ca
Sat Sep 25 03:56:53 CEST 2010


Hi everyone,

- I'm conducting a habitat selection analysis for which my response variable is either species richness (i.e.,counts; negative binomial distribution) or presence/absence of a species. 

- I have confirmed spatial autocorrelation in the response variables using moran.mc(), and have created correlograms to determine at what (or rather up to what) distances positive autocorrelation is present (~100km for most species and species richness). That said, some of the explanatory variables I'm including in my models may account for some of this autocorrelation, particularly at larger distance classes. 

My questions:

a) I have read several postings on this list which caution against calculating Moran's i for residuals from a glm; however, I have searched and searched this forum and the literature, and have yet to find a posting or an article that clearly explains why. A posting in April 2010, by R. Bivand comes closest, stating, in reference to lm.morantest: "Since no studies have been done to find out how accurately this test detects spatial autocorrelation in glm errors, it is premature to simply extend findings for lm objects." However, does this statement apply to the test for significance of the Moran's i statistic, or the calculation of Moran's i itself? If the latter, I'm curious to know why you would be able to calculate the value of Moran's i for residuals from an lm, but not a glm - any article or explanation would be much very appreciated.

b) I plan to use a Bayesian approach (for species richness) and an autologistic model (for presence/absence) to account for spatial autocorrelation; however, I'm stuck on what distance to use in defining my neighborhood without being able to assess the autocorrelation that remains in the residuals of the glm (k nearest neighbors is not an option here, nor does it make as much sense as a distance neighborhood for my analysis). While testing for significance of the Moran's i statistic for residuals at different distance classes is obviously preferred, I would settle for creating a correlogram and conducting a visual inspection of residual spatial autocorrelation, if this makes sense (i.e., is supported and worth more than "electron recycling" as R. Bivand put it in another thread). If not, what are possible options here? In Zuur et al. (2009 - Chap 21) the authors use a spline correlogram as per the ncf package to assess residual spatial autocorrelation from a glm (family = binomial) - is this an option? Perhaps a variogram using the gstat package? 

And on a side note:
c) The spdep() manual states that for lm.morantest "offsets should not be used" in the lm model...Again: why? (yes, my model includes an offset).


Cheers and many thanks,
Jenn



More information about the R-sig-Geo mailing list