makedistancew {GeoXp}R Documentation

Spatial weight matrix based on distance threshold

Description

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.

Usage

makedistancew(x, y, distance)

Arguments

x a vector $x$ of size $n$
y a vector $y$ of size $n$
distance threshold point

Details

If site $i$ is seperated from $j$ by a distance lower or equal to a given threshold :

W_{ij}=1

else

W_{ij}=0

Value

A matrix W of size $n times n$ containing 0 and 1.

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 (2008), ``Statistique et Econométrie pour données géoréférencées : modèles et études de cas''

See Also

moranplotmap,makeneighborsw,normw,findneighbors

Examples

# data auckland
data(auckland)
W<-makedistancew(auckland$Easting,auckland$Northing,5)

[Package GeoXp version 1.2 Index]