question about nb2listw row standardization
On Tue, 4 Aug 2015, Mueller,Drew wrote:
I was hoping for a clarification on the row standardization of nb2listw. I have implemented a nb list based on distance, and a function dlist <- nbdists(col.gal.nb, coords) dlist <- lapply(dlist, function(x) 1/x) my question is, if I call Wa <- nb2listw(x, glist = dlist, style = "W") Wb <- nb2listw(x, glist = dlist, stlye = "B") is Wa then row standardized based on inverse distance or does the glist override this and I get actual undstandardized inverse distance weights? Also, would Wb actually be binary, or does the glist argument override this to make the weights 1/x instead of 1's and 0's? If my goal is to maintain the actual inverse distance weight without standardization (for better economic interpretation), does Wb give me an unstandardized W, or do I need to call a different function to avoid row standardization? If my goal IS to row standardize a weights matrix with weights based on inverse distance, then is Wa the correct function call? Mainly I was having trouble interpreting the help file for nb2listw as to whether style = "B" always creates 1's and 0's regardless of what glist is set to. Thanks
Please do check: library(spdep) example(columbus) coords <- coordinates(columbus) dlist <- nbdists(col.gal.nb, coords) dlist <- lapply(dlist, function(x) 1/x) Wa <- nb2listw(col.gal.nb, glist = dlist, style = "W") Wb <- nb2listw(col.gal.nb, glist = dlist, style = "B") summary(sapply(Wa$weights, sum)) summary(sapply(Wb$weights, sum)) "W" row standardises the general weights, "B" passes through general weights. IDW are perverse, and without - contrary to your assertion - economic meaning, because the scaling depends closely on the metric of the coordinates: summary(unlist(dlist)) are all < 1. Roger
Drew [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no