Creating and Managing Spatial-Weighting Matrices Using the spmat Command

David M. Drukker, Hua Peng, Ingmar Prucha, and Rafal Raciborski , Stata Journal 13(2) , 242-286 , January 2013.

We present the spmat command for creating, managing, and storing spatial-weighting matrices, which are used to model interactions between spatial or more generally cross-sectional units. spmat can store spatial-weighting matrices in a general and banded form. We illustrate the use of the spmat command and discuss some of the underlying issues by using United States county and postalcode-level data.

Links to Researchers