ntevc
Eigenvector centrality of each node
ntevc(from, to, w = NULL, nodes = NULL, tol = 1e-13, maxit = 1e+05)The leading eigenvector of the (weighted) adjacency matrix of the
undirected graph, scaled to a maximum of 1 (Bonacich 1972). It is found
by power iteration on A + c I, c the largest weight, which has the
same eigenvectors and whose leading eigenvalue is strictly dominant even
on a bipartite graph (a co-offending network between two roles, a star),
where plain power iteration oscillates. The iteration starts from 1 for
every node and stops when no value changes by tol or more between two
steps, or after maxit steps (then conv is FALSE).
Parameters
Section titled “Parameters”from, toLabels of the two ends of each edge: vectors of the same length (zero when
nodesgives every node) with no missing values.wNULL, or one positive weight per edge (a tie’s strength, such as the number of co-offences).nodesNULL, or every node’s label once: the node order of the results and the way to include isolated nodes.tolThe stopping tolerance: one number between 0 and 1.
maxitThe most steps: one whole number, at least 1.
Returns
Section titled “Returns”A list: cent, a data frame with node and evc; value, the
leading eigenvalue; iter, the steps taken; conv, whether the
tolerance was met.
On a disconnected graph the leading eigenvector lives on the components
with the largest leading eigenvalue; every other component gets 0 (each
component is iterated and scaled on its own, and a component whose
eigenvalue falls short of the largest by more than 1e-10 of it is set
to 0). When several components share the largest eigenvalue each is
scaled to a maximum of 1: any mix of them is an eigenvector too, so
compare nodes within a component. A graph without edges gives 1 for
every node. Graph rules as in ntdeg().
References
Section titled “References”Bonacich, P. (1972). Factoring and weighting approaches to status scores and clique identification. Journal of Mathematical Sociology, 2(1), 113-120. doi:10.1080/0022250X.1972.9989806
Examples
Section titled “Examples”ntevc(c("hub", "hub", "hub", "a"), c("a", "b", "c", "b"))Generated from the R help page: ntevc in the R reference.