Statalist


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

st: convert adjacency to edgelist


From   "Victor, Jennifer Nicoll" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: convert adjacency to edgelist
Date   Fri, 13 Feb 2009 16:25:36 -0500

Hello Stata users,

I have a 438x438 adjacency matrix (symmetrical, non-directed) where the cells are the number of connections between each i,j pair (the pairs are members of congress and the connections are the number of caucuses each pair is in).  I have it in Excel format, csv format, and Stata format.  I also have it in Stata as a dyadic dataset with attribute variables (N=95,703).   I want to convert either the dyadic data or the adjacency matrix to an edgelist that I could import into R (igraph) or NodeXL or TouchGraph so that I can make a network graph or two, but I need an edgelist to import into those programs.  My goal is to make a network graph where I can show that party leaders are more central in the network than non-party leaders (two of my attributes are party leaders and centrality scores).  

I'm wondering if I could write some Stata code that would allow me to convert one dataset or the other into an edgelist.  But I don't know how to do that.  Advice?

[Note:  Perhaps I'd be better off trying to do this in R, but I'm much more comfortable in Stata than in R--I'm still quite a novice there.  If some people on this list think this is easy to do in R and know how, I'm all ears and willing to work through it.]

Thanks!

___________________________________________
Jennifer Nicoll Victor
Assistant Professor
Department of Political Science
University of Pittsburgh
[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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index