These functions calculate common eigenvector-related centrality measures, or walk-based eigenmeasures, for one- and two-mode networks:

  • node_by_eigenvector() measures the eigenvector centrality of nodes in a network.

  • node_by_power() measures the Bonacich, beta, or power centrality of nodes in a network.

  • node_by_alpha() measures the alpha or Katz centrality of nodes in a network.

  • node_by_pagerank() measures the pagerank centrality of nodes in a network.

  • node_by_hub() measures how well nodes in a network serve as hubs pointing to many authorities.

  • node_by_authority() measures how well nodes in a network serve as authorities from many hubs.

  • node_by_subgraph() measures nodes' participation in all closed walks in the network, weighting shorter walks more heavily.

  • node_by_posneg() measures the PN (positive-negative) centrality of a signed network.

All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, first transform the salient properties using e.g. to_undirected() functions. All centrality and centralization measures return normalised or scaled measures where available, reported when the measure is printed.

Walk-based measures are mostly unbounded, so few of them can be normalised against a theoretical maximum in the way that degree, closeness and betweenness can. Most are instead scaled against the observed maximum, which ranks nodes within one network but does not give scores that are comparable between networks.

node_by_eigenvector(.data, normalized = TRUE, scaled = TRUE, scale = NULL)

node_by_power(
  .data,
  normalized = TRUE,
  scaled = FALSE,
  scale = NULL,
  exponent = 1
)

node_by_alpha(.data, decay = 0.85, alpha = NULL)

node_by_pagerank(.data, decay = 0.85)

node_by_authority(.data, scaled = TRUE)

node_by_hub(.data, scaled = TRUE)

node_by_subgraph(
  .data,
  decay = 1,
  walks = c("all", "odd", "even"),
  method = NULL
)

node_by_posneg(.data)

Arguments

.data

A network object of class stocnet, igraph, tbl_graph, network, or similar. Internally any of these will be coerced to an efficient implementation. For more information on possible coercions, see e.g. manynet::as_stocnet().

normalized

Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, whether the object is one-mode or two-mode, and other arguments. By default TRUE.

scaled

Logical scalar, whether to divide the results by the maximum observed in this network, so that the highest-scoring node takes the value one. Note that, unlike normalisation against a theoretical maximum, scaled scores are not comparable across different networks.

scale

Deprecated; use scaled instead.

exponent

Decay rate or attentuation factor for the Bonacich power centrality score. Can be positive or negative.

decay

A proportion between 0 and 1 giving how much of a contribution survives each additional step of distance or walk length. Lower values discount more steeply, so that only nearby others count; higher values discount less, so that longer walks continue to contribute. The measures that take a decay differ in what they discount and in what value leaves the measure in its most familiar form, so each documents its own default.

alpha

Deprecated; use decay instead.

walks

Character string indicating which closed walks to count. By default "all", which is subgraph centrality as usually defined. "odd" counts only walks of odd length and "even" only those of even length; the two sum to "all". Odd closed walks cannot occur within a bipartite structure, so a node scoring near zero on "odd" sits in a locally two-mode-like neighbourhood. See net_by_bipartivity() for the network-level counterpart.

method

Deprecated. The former spelling of walks. Still accepted, but warns; please use walks instead.

Value

A node_measure numeric vector the length of the nodes in the network, providing the scores for each node. If the network is labelled, then the scores will be labelled with the nodes' names.

The object also carries the measure it computed, the range its values can fall within, and whether and how those values were normalized. These are shown as a one-line header when the object is printed. Where a measure offers a choice between several ways of counting the same thing, it also carries the variant it used. All can be retrieved with attr().

Details

We use {igraph} routines behind the scenes here for consistency and because they are often faster. For example, igraph::eigencentrality() is approximately 25% faster than sna::evcent().

Eigenvector centrality

Eigenvector centrality operates as a measure of a node's influence in a network. The idea is that being connected to well-connected others results in a higher score. Each node's eigenvector centrality can be defined as: $$x_i = \frac{1}{\lambda} \sum_{j \in N} a_{i,j} x_j$$ where \(a_{i,j} = 1\) if \(i\) is linked to \(j\) and 0 otherwise, and \(\lambda\) is a constant representing the principal eigenvalue. Rather than performing this iteration, most routines solve the eigenvector equation \(Ax = \lambda x\). Note that since {igraph} v2.1.1, the values will always be rescaled so that the maximum is 1. This is not a limitation so much as a property of the measure: an eigenvector is defined only up to a scalar multiple, so its scores carry no absolute units to preserve.

Power or beta (or Bonacich) centrality

Power centrality includes an exponent that weights contributions to a node's centrality based on how far away those other nodes are. $$c_b(i) = \sum A(i,j) (\alpha = \beta c(j))$$ Where \(\beta\) is positive, this means being connected to central people increases centrality. Where \(\beta\) is negative, this means being connected to central people decreases centrality (and being connected to more peripheral actors increases centrality). When \(\beta = 0\), this is the outdegree. \(\alpha\) is calculated to make sure the root mean square equals the network size.

Alpha centrality

Alpha centrality is also known as Katz centrality, Katz-Bonacich centrality, or Katz status. The measure is named for the \(\alpha\) of Bonacich and Lloyd, which trades off the importance of external influence against the importance of connection: when \(\alpha = 0\) only the external influence matters, and as \(\alpha\) grows only the connectivity matters and we reduce to eigenvector centrality. Since \(\alpha\) is a per-step discount, netrics takes it as decay, the name it uses for that parameter throughout; by default 0.85. It operates better than eigenvector centrality for directed networks because eigenvector centrality will return 0s for all nodes not in the main strongly-connected component. Each node's alpha centrality can be defined as: $$x_i = \frac{1}{\lambda} \sum_{j \in N} a_{i,j} x_j + e_i$$ where \(a_{i,j} = 1\) if \(i\) is linked to \(j\) and 0 otherwise, \(\lambda\) is a constant representing the principal eigenvalue, and \(e_i\) is some external influence used to ensure that even nodes beyond the main strongly connected component begin with some basic influence. Note that many equations replace \(\frac{1}{\lambda}\) with \(\alpha\), hence the name.

For example, if \(\alpha = 0.5\), then each direct connection (or alter) would be worth \((0.5)^1 = 0.5\), each secondary connection (or tertius) would be worth \((0.5)^2 = 0.25\), each tertiary connection would be worth \((0.5)^3 = 0.125\), and so on.

Rather than performing this iteration though, most routines solve the equation \(x = (I - \frac{1}{\lambda} A^T)^{-1} e\).

Pagerank centrality

Pagerank centrality, or the PageRank citation ranking, is the stationary distribution of a random walk that at each step either follows an outgoing tie or teleports to a node chosen at random. Scores are therefore already shares that sum to one. decay is the probability of following a tie rather than teleporting, elsewhere called the damping factor; by default 0.85. As it approaches 0 the walk teleports at every step and all nodes score alike; as it approaches 1 the walk never teleports.

Hub and authority centrality

Hub and authority centrality are the two halves of Kleinberg's HITS (Hyperlink-Induced Topic Search) algorithm, and are computed together: good authorities are pointed to by good hubs, and good hubs point to good authorities. node_by_hub() and node_by_authority() return one each. In an undirected network the two coincide.

Subgraph centrality

Subgraph centrality measures the participation of a node in all subgraphs in the network, giving higher weight to smaller subgraphs. It is defined as: $$C_S(i) = \sum_{k=0}^{\infty} \frac{\delta^k (A^k)_{ii}}{k!}$$ where \((A^k)_{ii}\) is the \(i\)th diagonal element of the \(k\)th power of the adjacency matrix \(A\), representing the number of closed walks of length \(k\) starting and ending at node \(i\). Weighting by \(\frac{1}{k!}\) ensures that shorter walks contribute more to the centrality score than longer walks. The decay parameter \(\delta\) tunes that further, discounting each step by a further factor: at the default of 1 the measure takes its usual form, and lower values concentrate it on ever shorter walks.

Subgraph centrality is a good choice of measure when the focus is on local connectivity and clustering around a node, as it captures the extent to which a node is embedded in tightly-knit groups within the network. Note though that because of the way spectral decomposition is used to calculate this measure, this is not a good measure for very large graphs.

Summing these scores over all nodes gives the network's Estrada index, so a node's subgraph centrality is its contribution to that index.

PN (positive-negative) centrality

PN centrality extends walk-based centrality to signed networks. Negative ties are weighted twice as heavily as positive ties, \(P - 2N\), and the measure is then obtained in closed form by matrix inversion, so that — like alpha centrality, of which it is the signed analogue — it counts walks of all lengths with a length discount rather than counting only direct ties. Scores centre on 1: nodes above 1 are advantaged by their pattern of positive and negative ties, and those below 1 disadvantaged.

References

On eigenvector centrality

Bonacich, Phillip. 1972. “Factoring and Weighting Approaches to Status Scores and Clique Identification.” The Journal of Mathematical Sociology 2(1): 113–120. doi:10.1080/0022250X.1972.9989806

Bonacich, Phillip. 1991. “Simultaneous Group and Individual Centralities.” Social Networks 13(2):155–68. doi:10.1016/0378-8733(91)90018-O

On power centrality

Bonacich, Phillip. 1987. “Power and Centrality: A Family of Measures.” The American Journal of Sociology, 92(5): 1170–82. doi:10.1086/228631 .

On alpha centrality

Katz, Leo 1953. "A new status index derived from sociometric analysis". Psychometrika. 18(1): 39–43.

Bonacich, P. and Lloyd, P. 2001. “Eigenvector-like measures of centrality for asymmetric relations” Social Networks. 23(3):191-201.

On pagerank centrality

Brin, Sergey and Page, Larry. 1998. "The anatomy of a large-scale hypertextual web search engine". Proceedings of the 7th World-Wide Web Conference. Brisbane, Australia.

Page, Lawrence, Sergey Brin, Rajeev Motwani, and Terry Winograd. 1999. "The PageRank Citation Ranking: Bringing Order to the Web". Stanford InfoLab Technical Report 1999-66.

On hub and authority centrality

Kleinberg, Jon. 1999. "Authoritative sources in a hyperlinked environment". Journal of the ACM 46(5): 604–632. doi:10.1145/324133.324140

On subgraph centrality

Estrada, Ernesto and Rodríguez-Velázquez, Juan A. 2005. "Subgraph centrality in complex networks". Physical Review E 71(5): 056103. doi:10.1103/PhysRevE.71.056103

On odd and even closed walks

Estrada, Ernesto and Rodríguez-Velázquez, Juan A. 2005. "Spectral measures of bipartivity in complex networks". Physical Review E 72(4): 046105. doi:10.1103/PhysRevE.72.046105

On signed centrality

Everett, Martin G., and Stephen P. Borgatti. 2014. “Networks Containing Negative Ties.” Social Networks 38:111–20. doi:10.1016/j.socnet.2014.03.005

See also

Other eigenvector: measure_central_tie_eigen, measure_centralisation_eigen

Other centrality: measure_central_between, measure_central_close, measure_central_degree, measure_central_tie_between, measure_central_tie_close, measure_central_tie_degree, measure_central_tie_eigen, measure_centralisation_between, measure_centralisation_close, measure_centralisation_degree, measure_centralisation_eigen

Other measures: measure_assort_net, measure_assort_node, measure_breadth, measure_broker_node, measure_broker_tie, measure_brokerage, measure_central_between, measure_central_close, measure_central_degree, measure_central_tie_between, measure_central_tie_close, measure_central_tie_degree, measure_central_tie_eigen, measure_closure, measure_closure_node, measure_cohesion, measure_core, measure_diffusion_infection, measure_diffusion_net, measure_diffusion_node, measure_diverse_net, measure_diverse_node, measure_features, measure_fit, measure_fragmentation, measure_hierarchy, measure_periods

Other nodal: mark_core, mark_degree, mark_diff, mark_nodes, mark_select_node, measure_assort_node, measure_broker_node, measure_brokerage, measure_central_between, measure_central_close, measure_central_degree, measure_closure_node, measure_core, measure_diffusion_node, measure_diverse_node, member_brokerage, member_cliques, member_community, member_community_hier, member_community_non, member_components, member_core, member_diffusion, member_equivalence, motif_brokerage_node, motif_clique, motif_composition, motif_exposure, motif_node, motif_path

Examples

node_by_eigenvector(ison_southern_women)
#> # Eigenvector centrality, scaled [0, 1]
#> ▂▁▂▁▂▂▁▁ 
#>   Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl  Ruth Verne  Myra
#> 1  0.901  0.85       1  0.861     0.493   0.616   0.676 0.549 0.703 0.653 0.559
#> # ... and 7 more values from this nodeset. Use `print_all(...)` to print all values.
#>      E1    E2    E3    E4    E5    E6    E7    E8    E9   E10   E11   E12   E13
#> 1 0.371 0.391 0.612 0.448 0.735 0.749 0.833     1 0.777 0.413 0.224 0.476 0.291
#> # ... and 1 more values from this nodeset. Use `print_all(...)` to print all values.
node_by_power(ison_southern_women, exponent = 0.5)
#> # Power centrality (-Inf, Inf)
#> ▁▁▂▄▁▁▁ 
#>   Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl  Ruth Verne  Myra
#> 1  -1.44 -1.38   -1.44  -1.38     -1.00   -1.38   -1.38 -1.52 -1.44 -1.44 -1.52
#> # ... and 7 more values from this nodeset. Use `print_all(...)` to print all values.
#>      E1    E2    E3    E4    E5    E6    E7    E8    E9   E10   E11   E12   E13
#> 1 -1.32 -1.32 -1.32 -1.32 -1.32 -1.62 -1.62 -1.62 -1.62 -1.32 -1.32 -1.32 -1.32
#> # ... and 1 more values from this nodeset. Use `print_all(...)` to print all values.