| centrality | R Documentation |
Computes centrality measures for nodes in a network and returns a tidy data frame. Accepts matrices, edge-list data frames, igraph objects, cograph_network, or tna objects.
centrality(
x,
type = c("basic", "extended", "all"),
measures = NULL,
include = NULL,
mode = "all",
normalized = FALSE,
weighted = TRUE,
directed = NULL,
loops = TRUE,
simplify = "sum",
digits = NULL,
sort_by = NULL,
cutoff = -1,
invert_weights = NULL,
alpha = 1,
damping = 0.85,
personalized = NULL,
transitivity_type = "local",
isolates = "nan",
lambda = 1,
diffusion_method = NULL,
k = 3,
states = NULL,
decay_parameter = 0.5,
dmnc_epsilon = 1.7,
membership = NULL,
katz_alpha = 0.1,
hubbell_weight = 0.5,
shapley_k = 2,
shapley_cutoff = 2,
s_shell_a = 0.5,
discount_p = 0.01,
ncvote_theta = 0.5,
comm_r = "max_intra",
ld_radius = 2,
enrenew_depth = 2,
voterank_lambda = 0.1,
contraction_rho = 5,
wks_alpha = 1,
wks_beta = 1,
renewed_threshold = 2,
kpath_k = 3,
kpath_len = 3,
epc_threshold = 0.5,
epc_runs = 1000,
epc_seed = NULL,
betweenness_delta = 1,
closeness_delta = 1,
gravity_mass = "kshell",
gravity_radius = 3,
mdd_lambda = 0.7,
volume_radius = 2,
diffusion_q = 1,
diffusion_steps = 3,
ds_beta = 0.1,
ds_mu = 1,
ds_steps = 5,
cda_alpha = 0.5,
icc_alpha = 0.2,
exogenous_base = "reverse_closeness",
wlr_alpha = 1,
alr_h_mode = "all",
grc_gamma = 1,
rwd_decay = 0.5,
rwd_node_weights = NULL,
linerank_aggregation = "probability",
bridging_steps = 2,
bridging_values = NULL,
proximal_variant = "source",
exf_alpha = 2,
beta_direction = "positive",
ninl_order = 3,
ninl_radius = NULL,
map_flow = "unrecorded",
map_convention = "paper",
sr_prior = 0,
mcgm_radius = 2,
mcgm_alpha = NULL,
dkgm_radius = 2,
nd_order = 2,
nd_decay = 0.2,
nd_mass = "degree",
ira_mass = "coreness",
ira_alpha = 1,
ira_tol = 1e-06,
ira_max_iter = 1000,
iira_beta = 0.2,
iira_steps = 50,
hcc_delta = 0.5,
lhc_radius = 2,
tpr_alpha = 0.85,
tpr_k = 0.85,
tpr_decay = 1,
tpr_tol = 1e-14,
tpr_max_iter = 1000,
rsp_beta = 0.01,
rsp_cost = c("inverse", "weight"),
re_indexes = c("degree", "closeness", "betweenness", "constraint"),
re_negative = NULL,
tna_network = NULL,
psych_network = NULL,
...
)
x |
Network input (matrix, edge-list data frame, igraph, network, cograph_network, tna object) |
type |
Character scalar selecting a curated tier of measures when
Passing |
measures |
Character vector of specific measure names to compute.
When Batch 10 closes the gaps other centrality packages had and cograph did
not: "local_efficiency" (Latora & Marchiori 2001), "s_core" (Eidsaa &
Almaas 2013), "fragmentation" (Borgatti 2006), "kpath" (Sade 1989) and
"epc" (Lin et al. 2008). "fragmentation" and "epc" are costly, so
Batch 11 tunes families cograph already had: "length_scaled_betweenness"
(Brandes 2008), "delta_betweenness" and "delta_closeness" (Agneessens
et al. 2017), "ego_betweenness" (Everett & Borgatti 2005). "gravity"
gained |
include |
Character vector of costly measures to add back to a tier,
or |
mode |
For directed networks: "all", "in", or "out". Affects measures whose output columns carry a mode suffix, including degree, strength, closeness, eccentricity, coreness, harmonic, diffusion, leverage, k-reach, distance-based measures, community-aware measures, and expected influence. |
normalized |
Logical. Normalize values by dividing by max. Most measures are scaled to 0-1; signed expected-influence measures can retain negative values under psychometric normalization. For closeness, this is passed directly to igraph. |
weighted |
Logical. Use edge weights if available. Default TRUE. |
directed |
Logical or NULL. If NULL (default), auto-detect from matrix symmetry. Set TRUE to force directed, FALSE to force undirected. |
loops |
Logical. If TRUE (default), keep self-loops. Set to FALSE to remove them before calculation. |
simplify |
How to combine multiple edges between the same node pair
(possible only from edge-list, cograph_network or igraph input).
Options: "sum" (default), "mean", "max", "min". |
digits |
Integer or NULL. Round all numeric columns to this many decimal places. Default NULL (no rounding). |
sort_by |
Character or NULL. Column name to sort results by (descending order). Default NULL (original node order). |
cutoff |
Maximum path length to consider for betweenness, closeness, harmonic centrality and the distance-based closeness variants (radiality, lin, decay, residual_closeness, dangalchev, generalized_closeness, harary, average_distance, barycenter, wiener, centroid, closeness_vitality, delta_closeness). Default -1 (no limit). Set to a positive value for faster computation on large networks at the cost of accuracy. |
invert_weights |
Logical or NULL. For path- and distance-based measures (for example betweenness, closeness, harmonic, eccentricity, k-reach, radiality, decay, stress, flow betweenness, and related variants), should weights be inverted so that higher weights mean shorter paths? Default NULL auto-detects: TRUE for tna objects (transition probabilities), FALSE otherwise (matching igraph/sna). Set explicitly to TRUE for strength/frequency weights (qgraph style) or FALSE for distance/cost weights. |
alpha |
Numeric. Exponent for weight transformation when |
damping |
PageRank damping factor. Default 0.85. Must be between 0 and 1. |
personalized |
Named numeric vector for personalized PageRank. Default NULL (standard PageRank). Values should sum to 1. |
transitivity_type |
Type of transitivity to calculate: "local" (default),
"global", "undirected", "localundirected", "barrat" (weighted),
"weighted", or "onnela". The first six dispatch to
|
isolates |
How to handle isolate nodes in transitivity calculation: "nan" (default) returns NaN, "zero" returns 0. |
lambda |
Diffusion scaling factor for diffusion centrality. Default 1.
Only used when |
diffusion_method |
Character or NULL. Selects the diffusion-centrality
formula. |
k |
Path length parameter for geodesic k-path centrality. Default 3. |
states |
Named numeric vector of percolation states (0-1) for percolation centrality. Each value represents how "activated" or "infected" a node is. Default NULL (all nodes get state 1, equivalent to betweenness). |
decay_parameter |
Numeric. Decay parameter for decay and generalized closeness centrality. Default 0.5. Must be between 0 and 1. |
dmnc_epsilon |
Numeric. Epsilon exponent for DMNC (Density of Maximum Neighborhood Component). Default 1.7 as recommended by Lin et al. (2008). centiserve uses 1.67 (four-community assumption). Must be between 1 and 2. |
membership |
Integer vector of community assignments (one per node) for community-aware measures: participation, within_module_z, gateway, modularity_vitality, and the Gould-Fernandez brokerage roles. Default NULL. Required when requesting these measures. |
katz_alpha |
Attenuation factor for Katz centrality. Must satisfy
|
hubbell_weight |
Weight factor |
shapley_k |
Neighbor threshold |
shapley_cutoff |
Hop cutoff for |
s_shell_a |
Exponent of the asymmetric link weights for
|
discount_p |
Propagation probability for |
ncvote_theta |
Weight of the plain vote in |
comm_r |
Scale |
ld_radius |
Radius for |
enrenew_depth |
Renewal radius for |
voterank_lambda |
Suppression factor for |
contraction_rho |
|
wks_alpha, wks_beta |
Degree and strength exponents for
|
renewed_threshold |
Diffusion-importance threshold for
|
kpath_k |
Maximum path length for |
kpath_len |
Maximum path length for |
epc_threshold |
Edge removal probability for |
epc_runs |
Number of percolation realizations for |
epc_seed |
Random seed for |
betweenness_delta |
Decay exponent for |
closeness_delta |
Distance exponent for |
gravity_mass |
Mass in |
gravity_radius |
Largest distance each gravity source reaches in
|
mdd_lambda |
Exhausted-degree weight for |
volume_radius |
Closed neighborhood radius for |
diffusion_q |
Multiplier between 0 and 1 for |
diffusion_steps |
Nonnegative integer horizon for
|
ds_beta |
Spreading rate for |
ds_mu |
Recovery rate for |
ds_steps |
Nonnegative integer horizon for |
cda_alpha |
Degree-versus-strength weight for |
icc_alpha |
Shortest-path multiplicity exponent for
|
exogenous_base |
Base for |
wlr_alpha |
Finite in-degree exponent for |
alr_h_mode |
H-index convention for |
grc_gamma |
Finite nonnegative regularization strength for
|
rwd_decay |
Finite first-arrival discount in |
rwd_node_weights |
Nonnegative starting weights for
|
linerank_aggregation |
LineRank endpoint aggregation: probability
(default) or weight. See |
bridging_steps |
Nonnegative bridging-capital walk horizon, default two. |
bridging_values |
Optional source-destination value matrix for
|
proximal_variant |
Proximal betweenness role: source (default),
target, sum, or union. See |
exf_alpha |
Modified Expected Force degree factor, default two, finite and greater than one. |
beta_direction |
BG-index orientation, positive (default) or negative.
See |
ninl_order |
Nonnegative NINL iteration count, default three. |
ninl_radius |
NINL hop radius, NULL for ceiling of mean path length.
See |
map_flow |
Map equation flow model, unrecorded (default) or recorded. |
map_convention |
Map equation coding convention, paper (default) or
infomap. See |
sr_prior |
SpectralRank diagonal prior, default zero; scalar or one
value per node. See |
mcgm_radius |
MCGM hop cutoff, default two; NULL includes all reachable nodes. |
mcgm_alpha |
MCGM coefficient, NULL for the published adaptive rule.
See |
dkgm_radius |
DKGM hop cutoff, default two as in the paper's printed
example; NULL or infinity includes all reachable nodes and "auto"
applies the paper's half-mean-distance rule with cograph rounding.
See |
nd_order |
Steps of neighbors summed by |
nd_decay |
Per-step decay for |
nd_mass |
Benchmark centrality summed by
|
ira_mass |
Node centrality allocated by |
ira_alpha |
Exponent on the |
ira_tol |
Stopping tolerance for |
ira_max_iter |
Iteration bound for |
iira_beta |
Spreading rate for |
iira_steps |
Iterations for |
hcc_delta |
Weight on a node's own degree in the extended degree
used by |
lhc_radius |
Radius of the ball |
tpr_alpha |
Jump probability of the trust-PageRank iteration used
by |
tpr_k |
Weight the trust-value puts on the degree ratio rather than
the similarity ratio in |
tpr_decay |
Attenuation factor of the similarity recursion used by
|
tpr_tol |
Convergence tolerance on the largest relative
change of either trust-PageRank recursion, a single positive number,
default |
tpr_max_iter |
Iteration bound for both trust-PageRank recursions, a
whole number of at least one, default 1000. Reaching it raises
|
rsp_beta |
Inverse temperature of the randomized-shortest-paths
model used by |
rsp_cost |
How an edge weight becomes a traversal cost for
|
re_indexes |
Constituent indexes integrated by
|
re_negative |
Which of |
tna_network |
Logical or NULL. Umbrella switch that forces tna-style
conventions across all measures. |
psych_network |
Logical or NULL. Switch for signed psychometric
network conventions. |
... |
Additional arguments (currently unused) |
The following centrality measures are available:
Count of edges (supports mode: in/out/all)
Weighted degree (supports mode: in/out/all)
Shortest path centrality
Inverse distance centrality (supports mode: in/out/all)
Influence-based centrality
Random walk centrality (supports damping and personalization)
HITS authority score
HITS hub score
Maximum distance to other nodes (supports mode)
K-core membership (supports mode: in/out/all)
Burt's constraint (structural holes)
Local clustering coefficient (supports multiple types)
Harmonic centrality - handles disconnected graphs better than closeness (supports mode: in/out/all)
Diffusion degree centrality - sum of scaled degrees of node and its neighbors (supports mode: in/out/all, lambda scaling)
Leverage centrality - measures influence over neighbors based on relative degree differences (supports mode: in/out/all)
Geodesic k-path centrality - count of nodes reachable within distance k (supports mode: in/out/all, k parameter)
Alpha/Katz centrality - influence via paths, penalized by distance. Similar to eigenvector but includes exogenous contribution
Bonacich power centrality - measures influence based on connections to other influential nodes
Subgraph centrality - participation in closed loops/walks, weighting shorter loops more heavily
Laplacian centrality using Qi et al. (2012) local formula. Matches NetworkX and centiserve::laplacian()
Load centrality - fraction of all shortest paths through node, similar to betweenness but weights paths by 1/count
Information centrality - closeness based on electrical current flow (requires connected graph)
Random walk betweenness - betweenness based on current flow rather than shortest paths (requires connected graph)
VoteRank - identifies influential spreaders via iterative voting mechanism. Returns normalized rank (1 = most influential)
Percolation centrality - importance for spreading processes. Uses node states (0-1) to weight paths. When all states equal, equivalent to betweenness. Useful for epidemic/information spreading analysis.
Radiality centrality (centiserve). Sum of (diam + 1 - d) normalized by n-1.
Lin's centrality. Reachable nodes squared divided by sum of distances.
Decay centrality. Sum of delta^d for parameter delta.
Residual closeness. Sum of 1/2^d.
Dangalchev closeness (alias for residual closeness).
Generalized closeness. Sum of alpha^d.
Harary centrality. Sum of 1/d^2 for all reachable pairs.
Average distance (centiserve). Sum of distances / (n+1).
Barycenter centrality. 1 / sum of distances.
Wiener index. Total sum of shortest path distances from node.
Closeness vitality. Drop in Wiener index when node removed.
Total communicability. Row sums of matrix exponential.
Communicability betweenness. Fraction of communicability through each node.
Random walk centrality. Inverse sum of random walk distances (requires connected graph).
Stress centrality. Number of shortest paths through node.
Flow betweenness. Max-flow based betweenness.
Lobby index (h-index of neighborhood).
Graph entropy centrality. Entropy change on node removal.
Semi-local centrality. Triple-nested neighborhood sum.
ClusterRank. Clustering coefficient times neighbor degree sum.
Bottleneck centrality. Count of shortest path trees where node is critical.
Centroid value. Minimum f(v,i) across all nodes.
Maximum Neighborhood Component size.
Density of Maximum Neighborhood Component.
Topological coefficient. Shared neighbor ratio.
Bridging centrality. Betweenness times bridging coefficient.
Local bridging. (1/degree) times bridging coefficient.
Burt's effective size. Degree minus redundancy.
Diversity centrality. Shannon entropy of edge weight distribution.
Cross-clique connectivity. Count of cliques containing node.
Markov centrality. Inverse mean first passage time (requires connected graph).
Integration centrality. Distance-based influence.
Expected centrality. Sum of neighbor degrees.
Gil-Schmidt power index. Sum of 1/d normalized by n-1.
SALSA authority scores (directed graphs only).
LeaderRank. PageRank with ground node (directed graphs only).
Participation coefficient. Diversity of inter-community
connections (requires membership).
Within-module degree z-score. Intra-community
connectivity (requires membership).
Gateway coefficient. Inter-community brokerage weighted by
centrality (requires membership).
Normalized Shannon entropy of a node's hop-distance profile; 1 = distances spread evenly, 0 = all at one distance.
Growth exponent of the ball around a node
(slope of \ln B_i(r) on \ln r); lower = more
influential.
Entropy-weighted local dimension over boxes up to half the node's eccentricity; higher = more influential.
Mean degree of a node's neighbors (average neighbor degree); isolates score 0.
Drop in modularity when the node is removed
under a fixed partition; positive = community hub, negative = bridge
(requires membership).
Shapley value of the
node in the coverage games of Michalak et al. (2013): one-hop
coverage, shapley_k-neighbor coverage, and coverage within
shapley_cutoff hops. Values sum to the node count.
Mean bits needed to reach every other node along shortest paths without a map; low = well connected.
Mean bits others need to find the node; high = hidden.
Log rumor centrality on the node's BFS tree: log of the number of spreading orders that could start there.
Community size times intra-community
degree plus number of other communities touched times
inter-community degree (requires membership).
Drop in
the Shannon entropy of the degree (by mode) or betweenness
distribution when the node is deleted; signed, nats.
Shell index of the strength-based peeling with
asymmetric topological link weights, exponent s_shell_a.
Greedy seed-selection order
under degree discounting (discount_p) or unit discounting,
scored 1 for the first selected down to 1/n.
VoteRank with voters weighted by normalized
neighborhood coreness (ncvote_theta); election order scored
like voterank.
Links
weighted by the size of the community they reach; Gupta's scaled
intra/inter-degree combination (comm_r); base-2 entropy of the
link distribution over communities times degree share (all require
membership).
Silva-Costa estimator at ld_radius;
slope of the fuzzy ball (higher = more influential); slope of the
degree volume (lower = more important).
Election orders of the
weighted, entropy-based (enrenew_depth) and degree-weighted
(voterank_lambda) VoteRank variants, scored like
voterank.
One minus the
agglomeration ratio after contracting the node with its neighbors;
the improved form adds the same score of its edges on the line graph
(contraction_rho).
Number of node pairs whose most likely two-way random-walk route passes through the node.
Farness minus mean neighbor farness; lower = more central.
Share of neighbor pairs linked through the node but not directly.
-\sum_{j \in N(i)} k_j \ln k_j; lower = more
central.
h-index over topological link weights
k_i k_j repeated k_j times.
Mean degree of the neighbors inside the ego network; degree minus effective size.
k-shell on (k^\alpha s^\beta)^{1/(\alpha
+ \beta)} after Garas' weight normalization (wks_alpha,
wks_beta).
k-core of the graph after removing links whose
diffusion importance is below renewed_threshold.
Number of shortest paths of length at most
kpath_k starting at the node.
Global efficiency of the subgraph induced on
the node's neighbors, the node itself removed. Note that
igraph::local_efficiency() instead measures the distances
between those neighbors through the rest of the network.
Largest strength threshold whose s-core still contains the node; the k-core number when weights are absent.
Distance-weighted fragmentation of the network after deleting the node. Higher means a more disruptive removal.
Number of simple paths of length at most
kpath_len that the node lies on, endpoints included.
Edge percolated component: mean size of the node's
component over epc_runs bond-percolation realizations, as a
share of the network. A Monte Carlo estimate.
Betweenness with each separated pair
weighted by 1 / d(s,t).
Betweenness with the pair weight
(d(s,t) - 1)^{-\delta} (betweenness_delta).
Betweenness inside the node's own ego network.
\sum_j d_{ij}^{-\delta} / (n-1)
(closeness_delta).
Node truss number (k-2 triangles convention) and
mixed-degree shell threshold (mdd_lambda). Both use the
simple undirected skeleton; see centrality_truss.
Reciprocal-degree ratio, count of unconnected neighbor pairs, and count of triangle-supported relationships on the simple undirected skeleton.
Sum of degrees in the closed volume_radius-hop
neighborhood on the simple undirected skeleton.
Maximal clique centrality: sum of (|C|-1)! over
incident maximal cliques of size at least two. Costly; see
centrality_mcc for isolate and precision conventions.
Finite-horizon weighted outgoing walks:
\sum_{t=1}^{T}(qA)^t\mathbf{1}, with diffusion_q and
diffusion_steps. Distinct from diffusion degree.
Relative spectral-radius loss on vertex
deletion, evaluated by repeated eigendecomposition. Costly; see
centrality_dynamical_importance for zero-radius graphs.
Finite-time spreading score including
ds_beta, ds_mu and ds_steps; uses the simple
undirected skeleton.
Sum of focal-to-neighbor degree ratios on the simple undirected skeleton; the reciprocal of the bridging coefficient on nonisolated vertices.
One minus half the incident conductance
times effective-resistance sum. Weighted, componentwise and costly;
see centrality_resistance_curvature.
Sum of neighbors' neighborhood coreness; equivalently the squared simple adjacency times core numbers.
Gravity with the degree k-shell index as the mass at both
ends, default radius two; see centrality_dkgm.
Benchmark centrality plus its decayed sums
over non-backtracking walks of up to nd_order steps; the
Zoo's neighbor distance centrality at the defaults. See
centrality_neighbor_distance.
Steady state of a unit resource repeatedly reallocated to
neighbors in proportion to their ira_mass; conserved, so the
scores of a component sum to its size. Warns
cograph_no_converge where no steady state exists. See
centrality_ira.
The same recursion with each share scaled by
1-(1-\beta)^{k_i} for the iira_beta spreading rate,
run iira_steps times.
Decays geometrically, so only the order is meaningful. See
centrality_iira.
Local neighbor contribution: the cubed degree times the
binomial own-contribution factor (1-1/d_i)^{d_i-1} times the
neighbors' degree sum over n-1. Parameter-free; raw scores
depend on the whole graph's order. See centrality_lnc.
KED method: the degree times one plus the normalized
entropy of the neighbors' degrees times \exp(K_i/N) for the
neighbor-degree sum K_i and the whole graph's order
N. Parameter-free. See centrality_ked.
Hybrid characteristic centrality: the extended degree
\delta k_i+(1-\delta)\sum_{j\in N(i)}k_j over its maximum,
plus the E-shell peeling round in which the node leaves over the
number of rounds. Raw scores lie in [0,2] and are not
component-local. See centrality_hcc.
Extended hybrid characteristic centrality: the
closed-neighborhood sum of hcc, the focal node counted once.
See centrality_ehcc.
Lhc index: the degree-and-triangle-share influence
C(v)=\sum_{u\in\Phi(v)}k_u(1+TP(u))/d^2(uv) over the ball of
radius lhc_radius, summed over the open neighborhood. The
triangle share is normalized by TNTS=\sum_u NTS(u), three
times the number of distinct triangles, and is written as zero on a
triangle-free graph. Raw scores are not component-local. See
centrality_lhc.
Immediate effects centrality: the reciprocal mean length
of the influence sequences that end at a node,
(n-1)/\sum_{i\neq j}m_{ij} for the mean first passage times
M=(I-Z+EZ_{dg})\mathrm{diag}(1/c) of the influence chain
W=A/\mathrm{rowSums}(A) built with a_{ii}=1.
Direction-sensitive and costly (one eigenproblem and two dense
solves). NA at every node when the chain is reducible or the
graph has one node. Not the same measure as markov. See
centrality_iec.
Degree and importance of lines: the degree plus the share
of each incident line's importance I_e=(k_m-p-1)(k_n-p-1)/
(p/2+1) that the node's own degree claims,
k_i+\sum_{j\in\Gamma_i}I_{e_{ij}}(k_i-1)/(k_i+k_j-2), with
p the number of triangles on the line. Two-hop local and
component-local; never below the node's degree. See
centrality_dil.
Trust-PageRank: a damped PageRank whose split of
a node's score among its neighbors is the column-stochastic
trust-value T(i,j)=(1-k)s(i,j)/\sum_{l\in N_j}s(j,l)+
k\,d_i/\sum_{l\in N_j}d_l, with s the fixed point of SimRank
restricted to the lines of the graph. Scores sum to one when no node
is isolated. NA at every node of a component that has lines
but no triangle, where the similarity vanishes and the ratio is
undefined. Costly
(two fixed-point recursions over dense matrices). See
centrality_trust_pagerank.
Simple randomized shortest paths betweenness:
the expected number of visits a node receives over the Boltzmann
distribution on absorbing walks, summed over every ordered
source-target pair. rsp_beta interpolates between the
random-walk and shortest-path readings. Direction-sensitive,
component-local, and costly (one dense inverse). See
centrality_rsp_betweenness.
Normalized geometric mean of several index
distributions, the minimum-relative-entropy integration of
re_indexes; sums to one. See
centrality_relative_entropy.
Gravity with focal core-number and partner-degree masses, default radius three.
Sum of immediate neighbors' raw mixed gravitational centralities.
Sum of neighbors' raw k-shell gravity scores,
with gravity_radius applied around each neighbor.
Weighted degree and strength, adjusted by Barrat clustering,
plus weighted neighbor contributions; uses cda_alpha.
Closeness using distances divided by the
number of shortest paths raised to icc_alpha.
Contribution to all other nodes' base centrality,
measured by deletion. Selects a base using exogenous_base.
Exponential focal coreness times distance-discounted partner coreness (GSM).
Exponential degree-coreness influences with an adaptive distance exponent (H-GSM).
Exponential focal degree with partner degrees discounted by a global mean-degree distance exponent (IGSM).
Stationary scores with ground-node outgoing
weights determined by original in-degree and wlr_alpha.
PageRank on the line graph, aggregated at endpoints;
uses damping and linerank_aggregation.
Entropy of onward boundary degrees over all two-event transmission sequences.
Multi-characteristics gravity with degree, coreness and eigenvector masses; default radius two.
Outgoing Perron eigenvector with a unit-linked
ground node; sr_prior supplies optional diagonal information.
Smallest eigenvalue of each grounded symmetric
row-Laplacian; see centrality_controlrank.
Codelength saving on silencing a node, conditional on the supplied partition, flow model and coding convention.
Finite neighbor propagation of closed-neighborhood degree
volume; uses ninl_order and ninl_radius.
BG power shared by successors among predecessors;
beta_direction selects positive or negative orientation.
Betweenness in one-hop or two-hop ego networks times the original bridging coefficient.
Expected Force multiplied by
log degree with the scaling parameter exf_alpha.
First/last shortest-path intermediaries;
uses proximal_variant on the directed unweighted skeleton.
Counts four-edge nonbacktracking walks with each node at the middle, using original neighbor excess degrees.
Concentration of dyadic Burt constraints across contacts; isolates zero and single-contact nodes one.
Information-walk loss under single-entry deletion;
uses bridging_steps and bridging_values.
Weighted sum of discounted first arrivals
from random walks; uses rwd_decay and rwd_node_weights.
Reciprocal diagonal of the inverse
regularized weighted Laplacian, using grc_gamma.
Stationary scores with destination weights
determined by original H-indices using alr_h_mode.
A base data.frame with one row per node, in the input's node
order unless sort_by is given, and the columns:
node: character, the node labels (the index as a string
when the input carried no names)
One numeric column per requested measure, with a mode suffix for
the mode-aware measures (e.g., degree_in,
closeness_all); see list_centralities for which
measures carry a suffix. A measure that a tier supplied but that has
no value on this input is an all-NA column.
A few measures are
undefined on some graphs – the community-partition measures without
membership, or "relative_entropy" when one of its
constituent indexes is zero at every node. Naming such a measure in
measures or include raises a classed condition, because
you asked for that measure. When a tier (type = "basic",
"extended" or "all") supplied it, the condition becomes a
cograph_undefined_measure warning and the column is NA,
so one undefined measure does not take the rest of the tier with it.
# Built-in edge-list data
data(student_interactions)
centrality(student_interactions)
# Matrix input also works
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality(adj)
# Specific measures
centrality(adj, measures = c("degree", "betweenness"))
# Directed network with normalization
centrality(adj, mode = "in", normalized = TRUE)
# Sort by pagerank
centrality(adj, sort_by = "pagerank", digits = 3)
# PageRank with custom damping
centrality(adj, measures = "pagerank", damping = 0.9)
# Harmonic centrality (better for disconnected graphs)
centrality(adj, measures = "harmonic")
# Global transitivity
centrality(adj, measures = "transitivity", transitivity_type = "global")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.