Title
spmat getmatrix -- Copy a matrix contained in an spmat object to a Mata matrix
Syntax
spmat getmatrix objname [matname] [, options]
options Description ------------------------------------------------------------------------- id(vecname) name of a Mata vector to contain IDs eig(vecname) name of a Mata vector to contain eigenvalues -------------------------------------------------------------------------
Description
spmat getmatrix copies the spatial-weighting matrix W contained in the spmat object objname to the Mata matrix matname. The place identifiers and the eigenvalues of W can be optionally saved to Mata vectors.
Example
Setup . spmat use cobj using pollute.spmat
Copy the contiguity matrix contained in the spmat object cobj to the Mata matrix mymat . spmat getmatrix cobj mymat
Copy the eigenvalues contained in the spmat object cobj to the Mata vector myeig . spmat getmatrix cobj, eig(myeig)
Also see
Online: spmat, spreg, spivreg, spmap, shp2dta, mif2dta (if installed)