Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: spmat: banded matrix from friendship list


From   [email protected]
To   [email protected]
Subject   Re: st: spmat: banded matrix from friendship list
Date   Mon, 20 Jun 2011 10:39:52 -0500

Laszlo Sandor <[email protected]> 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

to

   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
use-?

-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
object.

> 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.

--Rafal
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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