[R-sig-Geo] How to create generalized spatial weight matrix in R

Roger Bivand Roger.Bivand at nhh.no
Wed Dec 3 12:28:10 CET 2003


On Wed, 3 Dec 2003, Susumu Tanimura wrote:

> Hi there,
> 
> Dose any one tell me how to create a following generalized spatial
> weight matrix in R?
> 
> w_{ij}=(l_{ij}/\sum_{j \in J}l_{ij})/d_{ij} (i=1,...,n)
> 
> l_{ij} is length of shared  border of area i and area j. d_{ij} is
> centroid to centroid distance.

Centroid to centroid distance can be done in several software 
environments, including spdep - see function nbdists(). The difficulty is 
the boundary proportion, where you really need the arc topology to get at 
this cheaply. Just as a thought, how closely might the boundary length 
proportions from a Voronoi diagram match the measured proportions? Would 
that give an approximation?

In general you may find that the binary representation is more 
parsimonious - it assumes less about a relationship we in any case do not 
know about.

> 
> I have enjoyed Moran's I with spdep package, but I found nb2listw()
> supported only binary spatial weight matrix and its standardized one.
> 
See the glist argument to nb2listw() for the way to insert generalised 
weights, such as inverse distance.


> Other than R, which software can create generalized spatial weight
> matrix?

On Windows, you could try GeoDa.

Are there other suggestions, perhaps in Matlab?

Roger

> 
> Thank you in advance.
> 
> --
> Susumu Tanimura <stanimura-ngs at umin.ac.jp>
> Dept. of Soico-environmental Medicine
> Institute of Tropical Medicine
> Nagasaki University, Japan
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list