| stresscent | R Documentation |
stresscent takes one or more graphs (dat) and returns the stress centralities of positions (selected by nodes) within the graphs indicated by g. Depending on the specified mode, stress 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).
stresscent(dat, g=1, nodes=NULL, gmode="digraph",
diag=FALSE, tmaxdev=FALSE, cmode="directed",
geodist.precomp=NULL, rescale=FALSE, ignore.eval=TRUE)
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 |
list 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 |
string indicating the type of betweenness centrality being computed (directed or undirected geodesics). |
geodist.precomp |
a |
rescale |
if true, centrality scores are rescaled such that they sum to 1. |
ignore.eval |
logical; should edge values be ignored when calculating density? |
The stress of a vertex, v, is given by
C_S(v) = \sum_{i,j : i \neq j,i \neq v,j \neq v} g_{ivj}
where g_{ijk} is the number of geodesics from i to k through j. Conceptually, high-stress vertices lie on a large number of shortest paths between other vertices; they can thus be thought of as “bridges” or “boundary spanners.” Compare this with betweenness, which weights shortest paths by the inverse of their redundancy.
A vector, matrix, or list containing the centrality scores (depending on the number and size of the input graphs).
Judicious use of geodist.precomp can save a great deal of time when computing multiple path-based indices on the same network.
Carter T. Butts buttsc@uci.edu
Shimbel, A. (1953). “Structural Parameters of Communication Networks.” Bulletin of Mathematical Biophysics, 15:501-507.
centralization
g<-rgraph(10) #Draw a random graph with 10 members
stresscent(g) #Compute stress scores
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.