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]

st: spmat


From   [email protected]
To   [email protected]
Subject   st: spmat
Date   Tue, 05 Apr 2011 08:11:13 -0500

Ashley Arnio <[email protected]> has a question about -spmat export-
producing unexpected results when exporting a k-nearest-neighbor matrix
in a neighbor list format:

> I created the matrix and ran the summary statistics. The summary 
> statistics revealed that a matrix was created in which each of my counties had
> 5 nearest neighbors. But, when I look at the neighbor list with the following 
> command,
> spmat export nn5 using nn5_list.txt , nlist replace
> I notice that some of my counties have 0 neighbors and others have as many as
> 7. 

> When I view the weights properties using the following command, 
> spmat export nn5 using nn5_properties.txt , replace 
> I can see that each county has five weights listed. 

> Why are the two lists different and how does Stata create weights for places 
> without neighbors? 

Ashley discovered a bug in -spmat export-.  The bug has been fixed and Ashley
should obtain the latest version of sppack by typing

 . ssc install sppack, replace

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