R/measure_centrality_degree.R
measure_central_degree.RdThese functions calculate common degree-related centrality measures for one- and two-mode networks:
node_by_degree() measures the degree centrality of nodes in an unweighted network,
or weighted degree/strength of nodes in a weighted network;
there are several related shortcut functions:
node_by_deg() returns the unnormalised results.
node_by_indegree() returns the direction = 'in' results.
node_by_outdegree() returns the direction = 'out' results.
node_by_multidegree() measures the ratio between types of ties in a multiplex network.
node_by_leverage() measures the leverage centrality of nodes in a 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. manynet::to_undirected() functions.
All centrality and centralization measures return normalised or scaled
measures where available, reported when the measure is printed.
Note that a weighted network has no theoretical maximum degree,
so node_by_degree() there returns scaled rather than normalised
scores, which rank nodes within this network but are not comparable
with those of another.
node_by_multidegree() is the one measure here that is not reached by
dispatch: a multiplex network does not itself say which two types of
tie to contrast, so tie1 and tie2 must be named.
node_by_degree(
.data,
normalized = TRUE,
alpha = 0,
direction = c("all", "out", "in")
)
node_by_deg(.data, alpha = 0, direction = c("all", "out", "in"))
node_by_outdegree(.data, normalized = TRUE, alpha = 0)
node_by_indegree(.data, normalized = TRUE, alpha = 0)
node_by_multidegree(.data, tie1, tie2)
node_by_leverage(.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().
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.
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. By default "all".
Character string indicating the first uniplex network.
Character string indicating the second uniplex network.
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().
node_by_degree() counts every tie a node holds, whatever its layer,
so a node tied twice to the same alter on two layers scores 2.
To score one layer at a time, take it first with
manynet::to_uniplex(), or use node_by_multidegree() to contrast two.
Note that to_uniplex() drops the nodes that hold none of the retained
ties, so scores from two layers are of different lengths.
The degree of a node is the number of connections it has. It is also sometimes called the valency of a node, \(d(v)\). The maximum degree in a network is often denoted \(\Delta (G)\) and the minimum degree in a network \(\delta (G)\). The total degree of a network is the sum of all degrees, \(\sum_v d(v)\). The degree sequence is the set of all nodes' degrees, ordered from largest to smallest. Directed networks discriminate between outdegree (degree of outgoing ties) and indegree (degree of incoming ties).
Given a weighted network, node_by_degree() sums tie weights rather than
counting ties, which is also known as strength centrality or weighted
degree centrality. The alpha argument tunes between the two, following
Opsahl et al. (2010), and the measure reports itself as
"strength centrality" whenever alpha is not zero.
Leverage centrality concerns the degree of a node compared with that of its neighbours, \(J\): $$C_L(i) = \frac{1}{d(i)} \sum_{j \in J(i)} \frac{d(i) - d(j)}{d(i) + d(j)}$$
Freeman, Linton C. 1978. "Centrality in social networks: Conceptual clarification". Social Networks 1(3): 215-239. doi:10.1016/0378-8733(78)90021-7
Faust, Katherine. 1997. "Centrality in affiliation networks." Social Networks 19(2): 157-191. 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. 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. 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. doi:10.1016/j.socnet.2010.03.006
Joyce, Karen E., Paul J. Laurienti, Jonathan H. Burdette, and Satoru Hayasaka. 2010. "A New Measure of Centrality for Brain Networks". PLoS ONE 5(8): e12200. doi:10.1371/journal.pone.0012200
Other degree:
mark_degree,
measure_central_tie_degree,
measure_centralisation_degree
Other centrality:
measure_central_between,
measure_central_close,
measure_central_eigen,
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_eigen,
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_eigen,
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
node_by_degree(ison_southern_women)
#> # Degree centrality, normalized [0, 1]
#> ▂▃▁▂▁▁▁
#> Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl Ruth Verne Myra
#> 1 0.571 0.5 0.571 0.5 0.286 0.286 0.286 0.214 0.286 0.286 0.286
#> # ... 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.167 0.167 0.333 0.222 0.444 0.444 0.556 0.778 0.667 0.278 0.222 0.333 0.167
#> # ... and 1 more values from this nodeset. Use `print_all(...)` to print all values.