Which R packages are good for what social network analysis?

October 8, 2013

Newbies to social network analysis in R should check out this great concise description from Michal Bojanowski on the SOCNET email list.  He writes:

There are two main R packages that provide facilities to store,manipulate and visualize network data. These are “network” and’igraph”. Technically speaking each package provides a specializedclass of R data objects for storing network data plus additionalfunctions to manipulate and visualize them. Each package has itsrelative strengths and weaknesses, but by and large you can do mostbasic network data operations and visualizations in both packagesequally easily. Moreover, you can convert network data objects from”network” to “igraph” or vice versa with functions from the”intergraph” package.Calculating basic network statistics (degree, centrality, etc.) ispossible for both types of objects. For “igraph” objects, functionsfor these purposes are contained in “igraph” itself. For “network”objects, most of the classical SNA routines are contained in the “sna”package.Community detection algorithms (e.g. Newman-Girvan) are available onlyin the “igraph” package.”Fancier things”, especially statistical models for networks (ERGMsetc.) are available in various packages that were build around the”network” package and jointly constitute the ‘statnet’ suite(http://www.statnet.org/). There is also “tnet” package with some moreroutines for among other things two-mode networks, which borrows fromboth “network” and “igraph” world. And of course there is RSiena forestimating actor-oriented models of network dynamics which is notrelated either “network” or “igraph”.As for matrix algebra, it is obviously available within R itself.My recommendation would be to have a look at both “igraph” and”network” and pick the one which seems easier to you as far asmanipulating and visualizing networks is concerned. Have a look at thedocumentation of these packages (e.g. onhttp://www.rdocumentation.org/) and at tutorials on e.g.:- statnet website (http://www.statnet.org/)- igraph homepage (http://igraph.sourceforge.net/)- R labs by McFarland et al (http://sna.stanford.edu/rlabs.php)- Slides and scripts to my Sunbelt workshop(http://www.bojanorama.pl/snar:start)It does not really matter whether you pick “igraph” or “network” asyou can aways convert your network to the other class with ‘asIgraph’or ‘asNetwork’ functions from “intergraph” package and take advantageof the functions available in the “other world”.

Check out more of Michal’s helpful contributions at his blog: http://bc.bojanorama.pl/

Help / Discussion lists for R packages

May 17, 2011

If you want to learn a methodology, there may be an email list you should be on.  The two big network analysis packages in R  Statnet and igraph each have one (sign up: Statnet, igraph, Mixed Models).  If you join them, you can ask questions when you get stuck.  But you may end up learning even more from other people’s questions.  Jorge M Rocha stimulated Carter Butts to write a mini-essay on exponential random graph models which I received permission to repost.  Dave Hunter also adds some thoughts at the bottom.

Read the rest of this entry »

Network Analysis Bleg for Help

March 16, 2010

So I’ve been working with the National Longitudinal Study of Adolescent Health (Add Health) for a while but I’ve only recently began looking at the raw friendship nomination data.  I’m hoping that someone can give me some practical advice.

My first question this: would you recommend using the network or igraph package?

I’m working in R, and I want to create some measures of centrality.    I wasn’t planning on doing ERG models or anything else complicated at the moment, just simple stuff.   If you want to recommend a different programming environment I’m happy to hear you make your case.