SNA has grown increasingly popular in the social sciences and beyond. Nevertheless, most major statistical packages have not yet incorporated the specific techniques required for the analysis of network data. As a result, practitioners are mostly limited to dedicated software such as pajek or UNINET.
As sophisticated as these programs are, I think it would be desirable for many users to have SNA techniques available within their favorite workhorse software. Fortunately, more and more user-contributed Stata tools for network analysis are becoming available. On this webpage, I will maintain a list of the available packages and resources, organized by functionality. I will update the list it when new packages are released. Also see here for earlier blog posts about SNA in Stata.
Managing network data
- stata2pajek , written by Gabriel Rossman, lets you export data from Stata to the Pajek data format
- pajek2stata (by myself) imports data stored in Pajek’s .net format into Stata, where it stores the node-level data as Stata variables and the relational part of the data as a Mata matrix.
- This blog post discusses how to transform an adjacency matrix into an edgelist in Stata.
Computing network measures
- centpow, written by Zachary Neal, computes degree centrality, alter-based centrality, power, and optionally (Bonacich’) beta centrality. As input it takes a comma-delimited file containing a square matrix.
- netsis (formerly “Stata Graph Library for Network Analysis”)
by Hirotaka Miura computes betweenness centrality, distances, and clustering. It takes an edgelist stored in two Stata variables as input. I discussed it also here.
Visualization
- netplot (by myself) draws network maps of network data using multi-dimensional scaling to calculate the layout of the nodes. As input it uses an edgelist stored in two Stata variables, allowing for isolates to be included. See here for the original blog post and here for the accompanying paper in the Stata Journal.