betweenness
takes one or more graphs (dat
) and returns the betweenness centralities of positions (selected by nodes
) within the graphs indicated by g
. Depending on the specified mode, betweenness on directed or undirected geodesics will be returned; this function is compatible with centralization
, and will return the theoretical maximum absolute deviation (from maximum) conditional on size (which is used by centralization
to normalize the observed centralization score).
betweenness(dat, g=1, nodes=NULL, gmode="digraph", diag=FALSE, tmaxdev=FALSE, cmode="directed", geodist.precomp=NULL, rescale=FALSE, ignore.eval=TRUE)
g
=1. gmode
is set to "digraph" by default. diag
is FALSE
by default. tmaxdev
==FALSE
. geodist
object precomputed for the graph to be analyzed (optional) $$ C_B(v) = \sum_{i,j : i \neq j, i \neq v, j \neq v} \frac{g_{ivj}}{g_{ij}}$$
where $g_ijk$ is the number of geodesics from $i$ to $k$ through $j$. Conceptually, high-betweenness vertices lie on a large number of non-redundant shortest paths between other vertices; they can thus be thought of as ``bridges'' or ``boundary spanners.''
Several variant forms of shortest-path betweenness exist, and can be selected using the cmode
argument. Supported options are as follows:
directed
undirected
endpoints
proximalsrc
proximaltar
proximalsum
lengthscaled
linearscaled
See Brandes (2008) for details and additional references. Geodesics for all of the above can be calculated using valued edges by setting ignore.eval=TRUE
. Edge values are interpreted as distances for this purpose; proximity data should be transformed accordingly before invoking this routine.
Borgatti, S.P. and Everett, M.G. (2006). A Graph-Theoretic Perspective on Centrality. Social Networks, 28, 466-484.
Brandes, U. (2008). On Variants of Shortest-Path Betweenness Centrality and their Generic Computation. Social Networks, 30, 136--145.
Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. Social Networks, 1, 215-239.
Geisberger, R., Sanders, P., and Schultes, D. (2008). Better Approximation of Betweenness Centrality. In Proceedings of the 10th Workshop on Algorithm Engineering and Experimentation (ALENEX'08), 90-100. SIAM.
centralization
, stresscent
, geodist
g<-rgraph(10) #Draw a random graph with 10 members
betweenness(g) #Compute betweenness scores
Run the code above in your browser using DataLab