These functions calculate common centrality measures for one- and two-mode networks.
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 normalized measures by default,
including for two-mode networks.
node_degree(
object,
normalized = TRUE,
alpha = 0,
direction = c("all", "out", "in")
)node_closeness(object, normalized = TRUE, direction = "out", cutoff = NULL)
node_betweenness(object, normalized = TRUE, cutoff = NULL)
node_eigenvector(object, normalized = TRUE, scale = FALSE)
node_reach(object, normalized = TRUE, k = 2)
node_power(object, normalized = TRUE, scale = FALSE, exponent = 1)
A single centralization score if the object was one-mode, and two centralization scores if the object was two-mode.
Depending on how and what kind of an object is passed to the function,
the function will return a tidygraph
object where the nodes have been updated
A numeric vector giving the betweenness centrality measure of each node.
A numeric vector giving the eigenvector centrality measure of each node.
A numeric vector giving each node's power centrality measure.
An object of a migraph-consistent class:
matrix (adjacency or incidence) from {base}
R
edgelist, a data frame from {base}
R or tibble from {tibble}
igraph, from the {igraph}
package
network, from the {network}
package
tbl_graph, from the {tidygraph}
package
Logical scalar, whether the centrality scores are normalized. Different denominators are used depending on whether the object is one-mode or two-mode, the type of centrality, and other arguments.
Numeric scalar, the positive tuning parameter introduced in
Opsahl et al (2010) for trading off between degree and strength centrality measures.
By default, alpha = 0
, which ignores tie weights and the measure is solely based
upon degree (the number of ties).
alpha = 1
ignores the number of ties and provides the sum of the tie weights
as strength centrality.
Values between 0 and 1 reflect different trade-offs in the relative contributions of
degree and strength to the final outcome, with 0.5 as the middle ground.
Values above 1 penalise for the number of ties.
Of two nodes with the same sum of tie weights, the node with fewer ties will obtain
the higher score.
This argument is ignored except in the case of a weighted network.
Character string, “out” bases the measure on outgoing ties, “in” on incoming ties, and "all" on either/the sum of the two. For two-mode networks, "all" uses as numerator the sum of differences between the maximum centrality score for the mode against all other centrality scores in the network, whereas "in" uses as numerator the sum of differences between the maximum centrality score for the mode against only the centrality scores of the other nodes in that mode.
Maximum path length to use during calculations.
Logical scalar, whether to rescale the vector so the maximum score is 1.
Integer of steps out to calculate reach
Decay rate for the Bonacich power centrality score.
node_degree()
: Calculates the degree centrality of nodes in an unweighted network,
or weighted degree/strength of nodes in a weighted network.
node_closeness()
: Calculate the closeness centrality of nodes in a network
node_betweenness()
: Calculate the betweenness centralities of nodes in a network
node_eigenvector()
: Calculate the eigenvector centrality of nodes in a network
node_reach()
: Calculate nodes' reach centrality
or how many nodes they can reach within k steps
node_power()
: Calculate the power centrality of nodes in a network
Faust, Katherine. 1997. "Centrality in affiliation networks." Social Networks 19(2): 157-191. tools:::Rd_expr_doi("10.1016/S0378-8733(96)00300-0").
Borgatti, Stephen P., and Martin G. Everett. 1997. "Network analysis of 2-mode data." Social Networks 19(3): 243-270. tools:::Rd_expr_doi("10.1016/S0378-8733(96)00301-2").
Borgatti, Stephen P., and Daniel S. Halgin. 2011. "Analyzing affiliation networks." In The SAGE Handbook of Social Network Analysis, edited by John Scott and Peter J. Carrington, 417–33. London, UK: Sage. tools:::Rd_expr_doi("10.4135/9781446294413.n28").
Opsahl, Tore, Filip Agneessens, and John Skvoretz. 2010. "Node centrality in weighted networks: Generalizing degree and shortest paths." Social Networks 32, 245-251. tools:::Rd_expr_doi("10.1016/j.socnet.2010.03.006")
Bonacich, Phillip. 1991. “Simultaneous Group and Individual Centralities.” Social Networks 13(2):155–68. tools:::Rd_expr_doi("10.1016/0378-8733(91)90018-O").
Bonacich, Phillip. 1987. “Power and Centrality: A Family of Measures.” The American Journal of Sociology 92(5): 1170–82. tools:::Rd_expr_doi("10.1086/228631").
to_undirected()
for removing edge directions
and to_unweighted()
for removing weights from a graph.
Other measures:
centralisation
,
closure
,
cohesion()
,
diversity
,
features
,
holes
,
tie_centrality
node_degree(mpn_elite_mex)
node_degree(ison_southern_women)
node_closeness(mpn_elite_mex)
node_closeness(ison_southern_women)
node_betweenness(mpn_elite_mex)
node_betweenness(ison_southern_women)
node_eigenvector(mpn_elite_mex)
node_eigenvector(ison_southern_women)
node_reach(ison_adolescents)
node_power(ison_southern_women, exponent = 0.5)
Run the code above in your browser using DataLab