flowbet | R Documentation |

`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)

`dat` |
one or more input graphs. |

`g` |
integer indicating the index of the graph for which centralities are to be calculated (or a vector thereof). By default, |

`nodes` |
vector indicating which nodes are to be included in the calculation. By default, all nodes are included. |

`gmode` |
string indicating the type of graph being evaluated. |

`diag` |
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. |

`tmaxdev` |
boolean indicating whether or not the theoretical maximum absolute deviation from the maximum nodal centrality should be returned. By default, |

`cmode` |
one of |

`rescale` |
if true, centrality scores are rescaled such that they sum to 1. |

`ignore.eval` |
logical; ignore edge values when computing maximum flow (alternately, edge values will be assumed to carry capacity information)? |

The (“raw,” or unnormalized) flow betweenness of a vertex, *v in V(G)*, is defined by Freeman et al. (1991) as

*
C_F(v) = sum( f(i,j,G) - f(i,j,G\v), i,j: i!=j,i!=v,j!=v ),*

where *f(i,j,G)* is the maximum flow from *i* to *j* within *G* (under the assumption of infinite vertex capacities, finite edge capacities, and non-simultaneity of pairwise flows). Intuitively, unnormalized flow betweenness is simply the total maximum flow (aggregated across all pairs of third parties) mediated by *v*.

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 *v*); this leads to the following normalized flow betweenness measure:

*
C'_F(v) = sum( f(i,j,G) - f(i,j,G\v), i,j: i!=j,i!=v,j!=v ) / sum( f(i,j,G), i,j: i!=j,i!=v,j!=v ).*

This variant can be selected by setting `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:

*
C''_F(v) = sum( (f(i,j,G) - f(i,j,G\v)) / f(i,j,G), i,j: i!=j,i!=v,j!=v ),*

where 0/0 flow ratios are treated as 0 (as in shortest-path betweenness). Setting `cmode=="fracflow"`

selects this variant.

A vector of centrality scores.

Carter T. Butts buttsc@uci.edu

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!

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.