Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Identifying vertex in Netsis and Distance


From   Guillaume Daudin <gdaudin@mac.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Identifying vertex in Netsis and Distance
Date   Tue, 18 Dec 2012 10:56:31 +0100

Dear all,

I am trying to compute transport costs between French department in the 19th century. I have a database presented as a weighted edge (between adjacent departements) list. My vertex names (1,000 / 2,000 / 3,000…. 89,000) are stored in the  depart and arrivee variables. Both are stored as "long".

I am using stata 12.1 on mac OS X  10.8.2. 

I have used netsis to compute the distance matrix doing

netsis depart arrivee, measure(distance) weight(cout) name(A, replace)

This provides me a matrix A in mata. I would like to import it bad in stata. I can do that with getmata.

clear
getmata (dpt*)= A

However, I am confused at the ordering of the matrix. The order of the rows and columns do not correspond to the numerical order of the vertex. For example, the 5th column/line corresponds to the department 20,000 instead of 5,000. On the other hand the 13th column/line corresponds indeed to the department 13,000. This does not seem to depend on the initial ordering of the variables.

I have the same issue with adjacency.

That would not be a problem if there was a way to know what should be the label of the rows or column, but I did not find any in the documentation. Then, I am not very good at using mata and I might be missing something obvious.

Can someone help ? I'll be happy to send the data

Best regards,

Guillaume Daudin


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index