Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

centralgraph

Find the Central Graph of a Labeled Graph Stack


Description

Returns the central graph of a set of labeled graphs, i.e. that graph in which i->j iff i->j in >=50% of the graphs within the set. If normalize==TRUE, then the value of the i,jth edge is given as the proportion of graphs in which i->j.

Usage

centralgraph(dat, normalize=FALSE)

Arguments

dat

one or more input graphs.

normalize

boolean indicating whether the results should be normalized. The result of this is the "mean matrix". By default, normalize==FALSE.

Details

The central graph of a set of graphs S is that graph C which minimizes the sum of Hamming distances between C and G in S. As such, it turns out (for the dichotomous case, at least), to be analogous to both the mean and median for sets of graphs. The central graph is useful in a variety of contexts; see the references below for more details.

Value

A matrix containing the central graph (or mean matrix)

Note

0.5 is used as the cutoff value regardless of whether or not the data is dichotomous (as is tacitly assumed). The routine is unaffected by data type when normalize==TRUE.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Banks, D.L., and Carley, K.M. (1994). “Metric Inference for Social Networks.” Journal of Classification, 11(1), 121-49.

See Also

Examples

#Generate some random graphs
dat<-rgraph(10,5)
#Find the central graph
cg<-centralgraph(dat)
#Plot the central graph
gplot(cg)
#Now, look at the mean matrix
cg<-centralgraph(dat,normalize=TRUE)
print(cg)

sna

Tools for Social Network Analysis

v2.6
GPL (>= 2)
Authors
Carter T. Butts [aut, cre, cph]
Initial release
2020-10-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.