Find Eigenvector Centrality Scores of Network PositionsSource:
eigen_centrality() takes a graph (
graph) and returns the
eigenvector centralities of positions
v within it
eigen_centrality( graph, directed = FALSE, scale = TRUE, weights = NULL, options = arpack_defaults() )
Graph to be analyzed.
Logical scalar, whether to consider direction of the edges in directed graphs. It is ignored for undirected graphs.
Logical scalar, whether to scale the result to have a maximum score of one. If no scaling is used then the result vector has unit length in the Euclidean norm.
A numerical vector or
NULL. This argument can be used to give edge weights for calculating the weighted eigenvector centrality of vertices. If this is
NULLand the graph has a
weightedge attribute then that is used. If
weightsis a numerical vector then it is used, even if the graph has a
weightedge attribute. If this is
NA, then no edge weights are used (even if the graph has a
weightedge attribute). Note that if there are negative edge weights and the direction of the edges is considered, then the eigenvector might be complex. In this case only the real part is reported. This function interprets weights as connection strength. Higher weights spread the centrality better.
A named list, to override some ARPACK options. See
A named list with components:
A vector containing the centrality scores.
The eigenvalue corresponding to the calculated eigenvector, i.e. the centrality scores.
A named list, information about the underlying ARPACK computation. See
arpack()for the details.
Eigenvector centrality scores correspond to the values of the first eigenvector of the graph adjacency matrix; these scores may, in turn, be interpreted as arising from a reciprocal process in which the centrality of each actor is proportional to the sum of the centralities of those actors to whom he or she is connected. In general, vertices with high eigenvector centralities are those which are connected to many other vertices which are, in turn, connected to many others (and so on). (The perceptive may realize that this implies that the largest values will be obtained by individuals in large cliques (or high-density substructures). This is also intelligible from an algebraic point of view, with the first eigenvector being closely related to the best rank-1 approximation of the adjacency matrix (a relationship which is easy to see in the special case of a diagonalizable symmetric real matrix via the \(SLS^-1\) decomposition).)
The adjacency matrix used in the eigenvector centrality calculation assumes that loop edges are counted twice; this is because each loop edge has two endpoints that are both connected to the same vertex, and you could traverse the loop edge via either endpoint.
In the directed case, the left eigenvector of the adjacency matrix is calculated. In other words, the centrality of a vertex is proportional to the sum of centralities of vertices pointing to it.
Eigenvector centrality is meaningful only for connected graphs. Graphs that are not connected should be decomposed into connected components, and the eigenvector centrality calculated for each separately. This function does not verify that the graph is connected. If it is not, in the undirected case the scores of all but one component will be zeros.
Also note that the adjacency matrix of a directed acyclic graph or the adjacency matrix of an empty graph does not possess positive eigenvalues, therefore the eigenvector centrality is not defined for these graphs. igraph will return an eigenvalue of zero in such cases. The eigenvector centralities will all be equal for an empty graph and will all be zeros for a directed acyclic graph. Such pathological cases can be detected by checking whether the eigenvalue is very close to zero.
From igraph version 0.5 this function uses ARPACK for the underlying
arpack() for more about ARPACK in igraph.
Bonacich, P. (1987). Power and Centrality: A Family of Measures. American Journal of Sociology, 92, 1170-1182.
Gabor Csardi firstname.lastname@example.org and Carter T. Butts (http://www.faculty.uci.edu/profile.cfm?faculty_id=5057) for the manual page.
# Generate some test data g <- make_ring(10, directed = FALSE) # Compute eigenvector centrality scores eigen_centrality(g) #> $vector #>  1 1 1 1 1 1 1 1 1 1 #> #> $value #>  2 #> #> $options #> $options$bmat #>  "I" #> #> $options$n #>  10 #> #> $options$which #>  "LA" #> #> $options$nev #>  1 #> #> $options$tol #>  0 #> #> $options$ncv #>  0 #> #> $options$ldv #>  0 #> #> $options$ishift #>  1 #> #> $options$maxiter #>  3000 #> #> $options$nb #>  1 #> #> $options$mode #>  1 #> #> $options$start #>  1 #> #> $options$sigma #>  0 #> #> $options$sigmai #>  0 #> #> $options$info #>  0 #> #> $options$iter #>  5 #> #> $options$nconv #>  1 #> #> $options$numop #>  17 #> #> $options$numopb #>  0 #> #> $options$numreo #>  15 #> #>