makedistanceW {GeoXp} | R Documentation |
The function `makedistanceW' creates a spatial weight matrix based on a threshold distance, assigny 1 if the distance between the two sites is lower or equal to a given threshold and 0 otherwise.
makedistanceW(x, y, distance)
x |
a vector $x$ of size $n$ |
|
|
y |
a vector $y$ of size $n$ |
|
|
distance |
threshold point |
If site $i$ is seperated from $j$ by a distance lower or equal to a given threshold :
W_{ij}=1
else
W_{ij}=0
A matrix W of size $n times n$ containing 0 and 1.
Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.
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''
moranplotmap
,makeneighborsw
,normw
,findneighbors
# data auckland data(auckland) W<-makedistanceW(auckland$Easting,auckland$Northing,5)