Hi there,
  Take the data of columbus(spdep) as an example. Say “i” is one of the
polygons, and “j” represents its neighbours. How to get the vlues of
“sum(Wij*Xj)”?  “Wij” means the weights, which can be get by
“nb2listw$weights”.
Say “Xj” to be “columbus$PLUMB”. The problem is how to get the right values
of “columbus$PLUMB” for the corresponding neighbours, so i can calculate the
"sum(Wij*Xj)"? See the following example.
example(columbus);coords <- coordinates(columbus)
nbs <- dnearneigh(coords,0,4)
nbslistw<-nb2listw(nbs, style="B")
#nbslistw$neighbours; nbslistw$weights
 I can not figure it out. Anybody can give me some suggestions?
Thanks.

-- 
-----------------
Jane Chang
Queen's

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to