help spmat summarize
-------------------------------------------------------------------------------

Title

spmat summarize -- Summarize the spatial-weighting matrix W contained in an spmat object

Syntax

spmat summarize objname [, options]

options Description ------------------------------------------------------------------------- links report links detail display detailed summary of links banded display banded information btruncate(b B) bin truncation dtruncate(l u) diagonal truncation vtruncate(#) value truncation ------------------------------------------------------------------------- Only one of banded, btruncate(), dtruncate(), or vtruncate() may be specified.

Description

spmat summarize summarizes the spatial-weighting matrix W contained in the spmat object objname. If the object contains an n x n matrix, the user can optionally request summary statistics that show whether the matrix can be stored in a banded form.

Options

links requests that spmat summarize reports links rather than the default values. This option is useful for summarizing contiguity matrices.

detail requests a detailed tabulation of links. detail will also display IDs of observations with the minimum and maximum number of links.

banded reports the bands for the matrix that has already a (possibly) banded structure but is stored in an n x n form.

truncate() options report the bands for the matrix after its values have been changed to zero according to one of the truncation criterion.

btruncate(b B) partitions the values of W into B bins and truncates to zero those entries that fall into bin b or below.

dtruncate(l u) truncates to zero the values of W that fall l diagonals below and u diagonals above the main diagonal. Neither value can be greater than floor((cols(W)-1)/4).

vtruncate(#) truncates to zero the values of W that are less than or equal to #.

Example

Setup . spmat use cobj using pollute.spmat

Summarize the contiguity matrix contained in the spmat object cobj . spmat summarize cobj, links

Saved results

spmat summarize saves the following in r():

Scalars r(b) number of rows in W r(n) number of columns in W r(lband) lower band of W r(uband) upper band of W r(min) minimum of W r(min0) minimum element > 0 in W r(mean) mean of W r(max) maximum of W r(lmin) minimum number of neighbors in W r(lmean) mean number of neighbors in W r(lmax) maximum number of neighbors in W r(ltotal) total number of neighbors in W r(eig) 1 if object contains eigenvalues, 0 otherwise r(canband) 1 if W can be banded based on r(lband) and r(uband), 0 otherwise

Also see

Online: spmat, spreg, spivreg, spmap, shp2dta, mif2dta (if installed)