Skip to content
Prev 8572 / 29559 Next

how to find observed Moran's I value using moran.test(spdep)

On Mon, 21 Jun 2010, elaine kuo wrote:

            
Don't do this, the expected value and the calculated variance under 
normality and randomisation are wrong. Use lm.morantest(), but be aware 
that it is for an lm() fit, not a glm() fit. There are no tests with 
statistical authority for glm residuals (as far as I know).

One would usually assign the output of a test to an object, then examine 
the object with str() to find the required value, here the list component 
called estimate, first vector element.

So lm.morantest(modg1, modg1.listw)$estimate[1] is the calculated value of 
Moran's I for your glm model, for what it is worth.

Roger