Skip to content
Prev 27809 / 29559 Next

Creating Spatial Weight Matrices with Large Data

On Mon, 2 Dec 2019, Chanda Chiseni wrote:

            
Please provide the (shortened) code used. poly2nb() is used for polygons, 
not points. If you were using distances between points, you may have used 
a distance threshold such that many observations have many neighbours. 
Also ask yourself whether this is not a multi-level problem, in that 
spatial interactions perhaps occur between aggregates of observations, not 
the observations themselves.
An nb object (and listw) are just lists of length n, so a neighbour object 
with 800K observations and 4 neighbours each only takes about 13MB, the 
listw takes 38MB. What you can use them for may be another problem, and 
much of the data may actually simply be noise not signal.

Roger