Skip to content
Prev 12239 / 29559 Next

Fill in empty links with nearest neighbors

Hi. I have a shapefile. I guess because of cartography problem, the border of some of the units that are supposed to be physically connected are 'snapped' properly. As a result, when I use poly2nb, there are empty links. 

I know I can set zero.policy=T in nb2listw. But I'm trying to use skater() function. I notice that it won't accept spatial weight matrix with empty link.

Any advice on how can I easily fix the matrix? Is there a way I can fill in empty link with nearest neighbors? 

I'd really appreciate advice on how to manually tweak the connectivity matrix.

Thanks in advance!

K.