
flowbet
takes one or more graphs (dat
) and returns the flow betweenness scores of positions (selected by nodes
) within the graphs indicated by g
. Depending on the specified mode, flow 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).
flowbet(dat, g = 1, nodes = NULL, gmode = "digraph", diag = FALSE,
tmaxdev = FALSE, cmode = "rawflow", rescale = FALSE,
ignore.eval = FALSE)
A vector of centrality scores.
one or more input graphs.
integer indicating the index of the graph for which centralities are to be calculated (or a vector thereof). By default, g
=1.
vector indicating which nodes are to be included in the calculation. By default, all nodes are included.
string indicating the type of graph being evaluated. digraph
indicates that edges should be interpreted as directed (with flows summed over directed dyads); graph
indicates that edges are undirected (with only undirected pairs considered). gmode
is set to digraph
by default.
boolean indicating whether or not the diagonal should be treated as valid data. Set this true if and only if the data can contain loops. diag
is FALSE
by default.
boolean indicating whether or not the theoretical maximum absolute deviation from the maximum nodal centrality should be returned. By default, tmaxdev
==FALSE
.
one of rawflow
, normflow
, or fracflow
(see below).
if true, centrality scores are rescaled such that they sum to 1.
logical; ignore edge values when computing maximum flow (alternately, edge values will be assumed to carry capacity information)?
Carter T. Butts buttsc@uci.edu
The (“raw,” or unnormalized) flow betweenness of a vertex,
The above flow betweenness measure is computed by flowbet
when cmode=="rawflow"
. In some cases, it may be desirable to normalize the raw flow betweenness by the total maximum flow among third parties (including cmode=="normflow"
.
Finally, it may be noted that the above normalization (from Freeman et al. (1991)) is rather different from that used in the definition of shortest-path betweenness, which normalizes within (rather than across) third-party dyads. A third flow betweenness variant has been suggested by Koschutzki et al. (2005) based on a normalization of this type:
cmode=="fracflow"
selects this variant.
Freeman, L.C.; Borgatti, S.P.; and White, D.R. (1991). “Centrality in Valued Graphs: A Measure of Betweenness Based on Network Flow.” Social Networks, 13(2), 141-154.
Koschutzki, D.; Lehmann, K.A.; Peeters, L.; Richter, S.; Tenfelde-Podehl, D.; Zlotowski, O. (2005). “Centrality Indices.” In U. Brandes and T. Erlebach (eds.), Network Analysis: Methodological Foundations. Berlin: Springer.
betweenness
, maxflow
g<-rgraph(10) #Draw a random graph
flowbet(g) #Raw flow betweenness
flowbet(g,cmode="normflow") #Normalized flow betweenness
g<-g*matrix(rpois(100,4),10,10) #Add capacity constraints
flowbet(g) #Note the difference!
Run the code above in your browser using DataLab