[R-sig-Geo] distribution of distance for lags (spdep package)

Horacio horacio at unm.edu
Tue Oct 3 23:52:42 CEST 2006


Dear R-geo people,

I just discovered the beauty of the spdep package to make spatial 
analysis of point data easier... However, as I am climbing the learning 
curve I have a question regarding the estimation of the the lag in the 
Moran and/or corelogram function.

As I understand, if the you generate a neighbor-list using the 
knearneigh 
<http://finzi.psych.upenn.edu/R/library/spdep/html/knearneigh.html> 
function you get a 'knn' class of the points I k distance apart. Then 
when you calculate the Moran's I (at least that's what I did) you get 
the Lag in terms of the number of links which in practical purposes is 
k. so, the first correlation value (od Moran's I) is the obtained by 
comaring all the sites that have a direct link between them, then, the 
second lag does it in terms of the ones that are 2 links apart and so on...

My question is perhaps very simple... How can I generate a list to plot 
the distribution of distances for each lag? I thought nbdists could do 
it, but are not sure how to go about it...


thank you



Horacio




More information about the R-sig-Geo mailing list