centralities {tna} | R Documentation |
Calculate Centrality Measures for a Transition Matrix
Description
Calculates several centrality measures. See 'Details' for information about the measures.
Usage
centralities(x, loops = FALSE, normalize = FALSE, measures, ...)
## S3 method for class 'tna'
centralities(x, loops = FALSE, normalize = FALSE, measures, ...)
## S3 method for class 'matrix'
centralities(x, loops = FALSE, normalize = FALSE, measures, ...)
## S3 method for class 'group_tna'
centralities(x, loops = FALSE, normalize = FALSE, measures, ...)
Arguments
x |
A |
loops |
A |
normalize |
A |
measures |
A |
... |
Ignored. |
Details
The following measures are provided:
-
OutStrength
: Outgoing strength centrality, calculated usingigraph::strength()
withmode = "out"
. It measures the total weight of the outgoing edges from each node. -
InStrength
: Incoming strength centrality, calculated usingigraph::strength()
withmode = "in"
. It measures the total weight of the incoming edges to each node. -
ClosenessIn
: Closeness centrality (incoming), calculated usingigraph::closeness()
withmode = "in"
. It measures how close a node is to all other nodes based on the incoming paths. -
ClosenessOut
: Closeness centrality (outgoing), calculated usingigraph::closeness()
withmode = "out"
. It measures how close a node is to all other nodes based on the outgoing paths. -
Closeness
: Closeness centrality (overall), calculated usingigraph::closeness()
withmode = "all"
. It measures how close a node is to all other nodes based on both incoming and outgoing paths. -
Betweenness
: Betweenness centrality defined by the number of geodesics calculated usingigraph::betweenness()
. -
BetweennessRSP
: Betweenness centrality based on randomized shortest paths (Kivimäki et al. 2016). It measures the extent to which a node lies on the shortest paths between other nodes. -
Diffusion
: Diffusion centrality of Banerjee et.al. (2014). It measures the influence of a node in spreading information through the network. -
Clustering
: Signed clustering coefficient of Zhang and Horvath (2005) based on the symmetric adjacency matrix (sum of the adjacency matrix and its transpose). It measures the degree to which nodes tend to cluster together.
Value
A tna_centralities
object which is a tibble (tbl_df
).
containing centrality measures for each state.
See Also
Centrality measure functions
betweenness_network()
,
plot.group_tna_centralities()
,
plot.tna_centralities()
,
print.group_tna_centralities()
,
print.tna_centralities()
Examples
model <- tna(group_regulation)
# Centrality measures including loops in the network
centralities(model)
# Centrality measures excluding loops in the network
centralities(model, loops = FALSE)
# Centrality measures normalized
centralities(model, normalize = TRUE)