findneighbors {GeoXp} | R Documentation |
The function `findneighbors' gives for each site of coordinates $(x_c,y_c)$ the $m$ nearest neighbors in the set of sites.
findneighbors(xc, yc, m)
xc |
a numerical vector $x$ of size $n$ |
yc |
a numerical vector $y$ of size $n$ |
m |
number of nearest neighbors |
In case of ties, the nearest neighbor is randomly chosen among the ties. This function is called in makeneighborsw.r.
A matrix of size $n times n$ containing 1 on position $(i,j)$ if $j$ is m-nearest neighbour to $i$.
Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.
Aragon Yves, Perrin Olivier, Ruiz-Gazen Anne, Thomas-Agnan Christine (2008), ``Statistique et Econométrie pour données géoréférencées : modèles et études de cas''
moranplotmap
,makedistancew
,makeneighborsw
data(auckland) W<-findneighbors(auckland$Easting,auckland$Northing,1)