Note: To use hyperlinks on this site, right-click on the link, and then select “Open link in New Tab”.
This page was created to supplement Understanding Dark Networks: A Strategic Framework of the use of Social Network Analysis. In particular, keep in mind that there is a major typo on page 104 of the book that misspecifies the equation for the E-I Index. The actual equation is: \[E-I\ Index = \frac{E-I}{E+I}\]
The E-I Index is not common to many R packages, and it is not as simple as it seems to program. To make your life simpler, it is necessary to first install a package called isnar. The isnar package is written and maintained by Michal Bojanowski m.bojanowski@icm.edu.pl as a supplement to igraph.
The catch is that isnar is only available through Git Hub. Git Hub is a repository for open-source software, like R packages in development and similar stuff. Follow these steps to install isnar:
install.packages("devtools")
library(devtools)
install_github("mbojan/isnar")
Once the package is installed, open isnar
.
library(isnar)
library(igraph) # Open igraph too. You will need it later.
The generic method for using the E-I Index in isnar is ei(g, "attribute")
, where “g” is the igraph object, with a qualitative attribute (“attribute”) assigned to each of the vertices.
If you wish to use isnar’s example, enter the following:
ei(Wnet, "gender")
## [1] -0.1818182
To use the example from page 104 of the book using the Noordin data, you will use the Noordin combined network and add the Noordin membership attribute (labeled as “NordNet” here). With the isolates removed, you should be able to visualize something like this:
# plot the Noordin network
plot(g, layout=layout.fruchterman.reingold, vertex.label=NA)
To Get the E-I Index for the Noordin network, enter the following:
ei(g, "NordNet")
## [1] -0.4220532
Back to Understanding Dark Networks website
http://sites.google.com/site/understandingdarknetworks/