Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: spmat error in stata

Subject   st: spmat error in stata
Date   Tue, 08 Nov 2011 16:12:02 -0600

Ajita Atreya <> tried to create a banded spatial-weighting 
matrix using the user-written -spmat- but -spmat- refused:

> I am trying to create spatial matrix for more than 24000 observation on
> properties sold. I used spmat idistance ccounty point_y_1 point_x_1, id( _ID)
> banded vtruncate(1/500) but got an error message "object not created - bands
> must be <= 6078". What should I do to create band <=6078.

Before calling -spmat-, Ajita may try using the sorting method described in
section 5 of the spmat working paper available at

The idea behind the sorting method is to pick a spatial unit that is remote
relative to the other spatial units, calculate the distance from that unit to
all the other units, and sort the data according to the distance variable.  
The spatial-weighting matrix constructed from the sorted dataset is very likely
to have a usable band as the sorting pushes the nearby spatial units toward the
diagonal of the matrix.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index