Title
spmat -- Create and manage spatial-weighting matrix objects (spmat objects)
Syntax
spmat subcommand ... [, ...]
subcommand Description ------------------------------------------------------------------------- contiguity create an spmat object containing a contiguity matrix W idistance create an spmat object containing an inverse-distance matrix W
summarize summarize an spmat object note manipulate a note attached to an spmat object graph draw an intensity plot of W lag create a spatially lagged variable eigenvalues add eigenvalues of W to an spmat object drop drop an spmat object from memory
save save an spmat object to disk in Stata's native format export save an spmat object to disk as a text file getmatrix copy a matrix from an spmat object to a Mata matrix use create an spmat object from a file created by spmat save import create an spmat object from a text file dta create an spmat object from a Stata dataset putmatrix put a Mata matrix into an spmat object
permute permute rows and columns of W tobanded transform an n x n W into a banded b x n W -------------------------------------------------------------------------
Description
Spatial-weighting matrices are used to model interactions between spatial units in a dataset. spmat is a collection of commands for creating, importing, manipulating, and saving spatial-weighting matrices.
Spatial-weighting matrices are stored in spatial-weighting matrix objects (spmat objects). spmat objects contain additional information about the data used in constructing spatial-weighting matrices. spmat objects are used in fitting spatial models; see spreg, spivreg (if installed).
These commands are documented in Drukker, Peng, Prucha, and Raciborski (2011) which can be downloaded from http://econweb.umd.edu/~prucha/Papers/WP_spmat_2011.pdf.
References
Drukker, D. M., H. Peng, I. R. Prucha, and R. Raciborski. 2011. Creating and managing spatial-weighting matrices using the spmat command. Working paper, The University of Maryland, Department of Economics, http://econweb.umd.edu/~prucha/Papers/WP_spmat_2011.pdf.
Authors
David Drukker, StataCorp, College Station, TX. ddrukker@stata.com.
Hua Peng, StataCorp, College Station, TX. hpeng@stata.com.
Ingmar Prucha, Department of Economics, University of Maryland, College Park, MD. prucha@econ.umd.edu.
Rafal Raciborski, StataCorp, College Station, TX. rraciborski@stata.com.
Also see
Online: spreg, spivreg, spmap, shp2dta, mif2dta (if installed)