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: set minimum neighbors using spmat and idistance


From   Lyndsay Boggess <[email protected]>
To   [email protected]
Subject   st: set minimum neighbors using spmat and idistance
Date   Wed, 25 Sep 2013 12:54:12 -0400

I'm having trouble creating inverse distance weights on a population of
2054 census tracts. I use the following code in order to create the weights
for only those tracts within 2 miles (a theoretically derived distance
pertaining to travelling to crime):

spmat idistance laweights longitude latitude, id(tract)
dfunction(dhaversine, miles) vtruncate(1/2)

This leaves me with 38 islands, which I think is the problem because when I
try to create spatial lag variables, my variables end up with all values of
zero. Is there a way to force spmat to make sure that each tract has a
minimum of 1 neighbor even if it requires to extend the distance
beyond two miles?

I have looked at
http://econweb.umd.edu/~prucha/Papers/WP_spmat_2011.pdf extensively,
but I still cannot find a solution to my problem, so any help would be
greatly appreciated!!

Thanks,
Lyndsay
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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