findneighbors {GeoXp}R Documentation

Research of the $m$ nearest neighbors for sites.

Description

The function `findneighbors' gives for each site of coordinates $(x_c,y_c)$ the $m$ nearest neighbors in the set of sites.

Usage

findneighbors(xc, yc, m)

Arguments

xc a numerical vector $x$ of size $n$
yc a numerical vector $y$ of size $n$
m number of nearest neighbors

Details

In case of ties, the nearest neighbor is randomly chosen among the ties. This function is called in makeneighborsw.r.

Value

A matrix of size $n times n$ containing 1 on position $(i,j)$ if $j$ is m-nearest neighbour to $i$.

Author(s)

Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.

References

Aragon Yves, Perrin Olivier, Ruiz-Gazen Anne, Thomas-Agnan Christine (2006), ``Statistique et Econométrie pour données géoréférencées : modèles et études de cas''

See Also

moranplotmap,makedistanceW,makeneighborsw

Examples

data(auckland)
W<-findneighbors(auckland$Easting,auckland$Northing,1)

[Package GeoXp version 1.0 Index]