Skip to content

Calculating spatial autocorrelation (Moran's I) when have zero-inflated data?

2 messages · Laura S, Gavin Simpson

1 day later
#
On Sun, 2011-09-25 at 22:01 -0700, Laura S wrote:
Many zeros don't in and of themselves mean that the data are over
dispersed or zero-inflated.

You could simply start with fitting a count model via glm() and then
look at the residuals. Compute the variogram from the residuals to check
if the residuals are independent. You can also check this model to see
if it fits the data well or if the zero part is not well captured. If it
isn't then you have to move on to more complex models.

The pscl package contains tools for fitting models to over dispersed
count data. If the glm doesn't fit well, you could move on to these. The
spatial autocorrelation can be investigated from the residuals as above.
Where you go from there though is more complex. You could replace the
estimated correlation matrix with one estimated from the variogram to
produce a variance-covariance matrix that accounts for the lack of
dependence in the residuals. There may already be something in the
sandwich package that allows you to do this.

I'll stop now as I am getting somewhat out of my depth...

G