mreach.degree {keyplayer} | R Documentation |
Compute the M-reach Degree Centrality Score in a Netwrok
Description
mreach.degree
computes the size of reachable nodes from a particular node within M steps.
M-reach degree centrality generalizes the degree
centrality
by delimiting specific neighborhoods.
Usage
mreach.degree(
adj.matrix,
node,
M = Inf,
binary = TRUE,
cmode = "all",
large = TRUE,
geodist.precomp = NULL
)
Arguments
adj.matrix |
Matrix indicating the adjacency matrix of the network. |
node |
Integer indicating the column index of the chosen player in the adjacenncy matrix. If not specified, scores for all nodes will be reported. |
M |
Number indicating the maximum geodistance between two nodes,
above which the two nodes are considered disconnected.
M hence defines the reachable set. The default is |
binary |
Logical scalar. If |
cmode |
String indicating the type of centrality being evaluated.
|
large |
Logical scalar, whether the computation method for large network is
implemented. If |
geodist.precomp |
Geodistance precomputed for the graph to be analyzed (optional). |
Details
The interprtation of the measure in binary and weighted adjacency matrix are slightly different. In binary networks, the reachable set of nodes is defined by nodes that are reachable within M steps. In weighted networks, the reachable set is defined by nodes that are reachable within geodistance M.
Value
A vector indicating the outdegree, indegree, or total-degree mreach.degree score of the chosen node; or a data frame containing all the above information.
Author(s)
Weihua An weihua.an@emory.edu; Yu-Hsin Liu ugeneliu@meta.com
References
An, Weihua and Yu-Hsin Liu (2016). "keyplayer: An R Package for Locating Key Players in Social Networks."
The R Journal, 8(1): 257-268.
Butts, Carter T. (2014). sna: Tools for Social Network Analysis. R package
version 2.3-2. https://cran.r-project.org/package=sna
Csardi, G and Nepusz, T (2006). "The igraph software package for complex network research."
InterJournal, Complex Systems 1695. https://igraph.org/
See Also
geodist
;
shortest.paths
;
mreach.closeness
;
kpcent
;
kpset
Examples
# Create a 5x5 weighted and directed adjacency matrix,
# where edge values represent the strength of tie
W <- matrix(
c(0,1,3,0,0,
0,0,0,4,0,
1,1,0,2,0,
0,0,0,0,3,
0,2,0,0,0),
nrow=5, ncol=5, byrow = TRUE)
# List the 2-reach degree scores for every node where W is binarized
mreach.degree(W,M=2,cmode="all",large=FALSE)