[R-sig-Geo] spatial weight matrix

Stéphane Dray dray at biomserv.univ-lyon1.fr
Mon Jul 4 17:41:04 CEST 2005


Hello,
the usual to construct spatial weighting matrices is to firstly 
construct a neighbor object and then transform it to a listw object with 
nb2listw:

spatial data --> nb --> listw
To creat nb object, you can use:
cell2nb (for grid)
dnearneigh(for distance nb for points)
knearneigh and knn2nb (for k nearest neighbors for points)
tri2nb, graph2nb (for Delaunay triangulation and subgraphs)
poly2nb (for polygons)


drg999 at ksu.edu wrote:

>Hi,
>
>I am new to spatial R packages. I was going through the command of
>Moran's I, Geary's C etc... in the manual page of spdep package. It
>seems like I got stuck in the very beginning.
>
>I did not understand how to develop the spatial weight matrix. For
>example if I have county-wise data, how would  I form a spatial weight
>matrix from that. What kind of data is required? Does an user need to
>furnish the neighbor list or is their any function in R that does it?
>
>Thanks foe help.
>Debarchana.
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>  
>


-- 
Stéphane DRAY (dray at biomserv.univ-lyon1.fr )
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
Tel: 33 4 72 43 27 57       Fax: 33 4 72 43 13 88
http://www.steph280.freesurf.fr/




More information about the R-sig-Geo mailing list