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]

Re: st: spmat: banded matrix from friendship list

Subject   Re: st: spmat: banded matrix from friendship list
Date   Mon, 20 Jun 2011 10:39:52 -0500

Laszlo Sandor <> has some questions about the user-written
-spmat- program:

> My understanding of the documentation is that -spmat import ..., nlist- does
> not automatically give me a banded matrix.

-spmat import ..., nlist- will automatically create a banded matrix if the
first line of the textfile contains the bands.  Otherwise, -spmat import-
assumes the matrix is square.  Thus, if Laszlo knows the bands, he should edit
the very first line of the textfile from, let's say,



   10000 200 250

where '10000' denotes the total number of spatial units, '200' denotes the lower
band, and '250' denotes the upper band.

> Could I generate a banded matrix outside of Stata that -spmat- can -spmat

-spmat use- will only read spatial-weighting objects created by -spmat save-.
Laszlo could save a banded matrix created outside of Stata to a space-delimited
text file, add the necessary information in the first line of the text file as
per above, and then use -spmat import ..., nlist- to create a spatial-weighting

> Or if I attempt a monstrous -spmat import- in order to be able to -spmat 
> tobanded- right after that, is there any way to find a helpful sorting to do
an -spmat permute-?

At the moment, -spmat- does not offer this capability.

*   For searches and help try:

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