[R-sig-Geo] Spdep: help needed calculating Moran's I

Sam Field fieldsh at mail.med.upenn.edu
Fri Oct 26 18:37:19 CEST 2007


The value of the Moran's I will always depend on how the spatial weight matrix
is defined (and thus more specifically on your choice of an upper bound for
dnearneigh()).  I don't know if there are any statistical criteria for choosing
an upper bound - I imagine somebody has looked into this - I usually use a
substantively grounded criteria.  Ask yourself, for example, at what distance is
interaction between proximate geographic units no longer possible?  What is
generating (do you think) the spatial autocorrelation in residual species
richness?  What important variables have you left out and on what spatial scale
do their influences operate?  

The other, technical consideration, is to pick a number that does not generate
very many spatial isolates (i.e. geographic units with no neighbors). 

  

hope this helps!

Sam



Quoting Geertje Van der Heijden <g.m.f.vanderheijden04 at leeds.ac.uk>:

> Hi,
> 
> I have just posted the same question on the general R help mailing list,
> but thought that this list might be more appropriate. I am a new user of
> R.
> 
> Here is my problem:
> I have 58 sites from across South America. I have done a regression
> analysis to relate environmental and biogeographical variables to
> species richness and want to test whether my residuals are
> autocorrelated. As far as I understand the Moran's I, I have to take all
> possible combinations between all points into account to test this. So I
> have used dnearneigh() with the lower boundary set to 0 and the upper
> boundary set arbitrarily high to make sure all connections are included.
> 
> 
> >coords <- as.matrix(cbind(lowland$long, lowland$lat))
> >coord.nb <- dnearneigh(coords, 0, 10000, longlat=TRUE)
> >coord.list <- nb2listw(coord.nb, style="W")
> >lianasp.lm <- lm(lianasprich ~ log(averdist) + dsl + lianadens +
> wooddens)
> >lm.morantest(lianasp.lm, coord.list, alternative="two.sided")
> 
> However, this gives me a Moran's I which is exactly the same as the
> expected Moran's I (and hence a p-value of 1). If I change the lower or
> upper boundary slightly so that not all possible links are taken into
> account, the value is different, but still really near to the expected
> Moran's I. I don't understand why these values are or the same or nearly
> so.
> 
> I am new to spatial statistics, so this might me a really basic question
> and my appologies if it is, but I am generally a bit at a loss now about
> the Moran's I and I am wondering if I have calculated it right. Have
> used to right method to convert my coordinates into neighbourhood
> distances (and if not, which method should I have used) and am I
> understanding and calculation the Moran's I correctly?
> 
> Any help would be greatly appreciated.
> 
> Many thanks,
> Geertje
> 
> ~~~~
> Geertje van der Heijden
> PhD student
> Tropical Ecology
> School of Geography
> University of Leeds
> Leeds LS2 9JT
> 
> Tel: (+44)(0)113 3433345 
> Email: g.m.f.vanderheijden04 at leeds.ac.uk
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> 


-- 
********Note the new contact information*******

Samuel H. Field, Ph.D. 
Senior Research Investigator
CHERP/Division of Internal Medicine - University of Pennsylvania
Philadelphia VA Medical Center
3900 Woodland Ave (9 East)
Philadelphia, PA 19104
(215) 823-5800 EXT. 6155 (Office)
(215) 823-6330 (Fax)




More information about the R-sig-Geo mailing list