stresscent
takes a graph stack (dat
) and returns the stress centralities of positions within one graph (indicated by nodes
and g
, respectively). 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=c(1:dim(dat)[2]), gmode="digraph",
diag=FALSE, tmaxdev=FALSE, cmode="directed",
geodist.precomp=NULL, rescale=FALSE)
g==1
."digraph"
indicates that edges should be interpreted as directed; "graph"
indicates that edges are undirected. 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_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.
centralization
g<-rgraph(10) #Draw a random graph with 10 members
stresscent(g) #Compute stress scores
Run the code above in your browser using DataLab