[R-sig-Geo] inverse distance weighting

Roger Bivand Roger.Bivand at nhh.no
Thu Mar 11 20:09:13 CET 2010

On Thu, 11 Mar 2010, Scott L Minkoff wrote:

> Hello,
> I am new to analyzing spatial data in R and was having trouble finding an
> answer to my question in the list archives.  I am interested in doing
> spatial regression with an inverse distance matrix.  To do this, I created
> the weights matrix outside of R (in ArcGIS) and then used the mat2listw
> function to convert it to a list that could be used in a spatial regression
> with the spdep package.  I am wondering whether this is an appropriate way
> to do this and, if not, what would be?

No, not appropriate as such, unless your distances are neither Euclidean 
nor Great Circle. See the examples on ?nbdists and ?nb2listw, or on the 
use og the glist= argument to nb2listw() to move the weights from your 
imported object via mat2listw(). When you use mat2listw(), there is no 
automatic way of setting the style of the listw object, so although it can 
be used for some things, it needs feeding through nb2listw() to tidy 
things up.


> Thanks in advance,
> Scott Minkoff
> University of Colorado at Boulder
> Department of Political Science
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

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

More information about the R-sig-Geo mailing list