gclust.boxstats | R Documentation |
gclust.boxstats
creates side-by-side boxplots of graph statistics based on a hierarchical clustering of networks (cut into k
sets).
gclust.boxstats(h, k, meas, ...)
h |
an |
k |
the number of groups to evaluate. |
meas |
a vector of length equal to the number of graphs in |
... |
additional parameters to |
gclust.boxstats
simply takes the hclust
object in h
, applies cutree
to form k
groups, and then uses boxplot
on the distribution of meas
by group. This can be quite handy for assessing graph clusters.
None
Actually, this function will work with any hclust
object and measure matrix; the data need not originate with social networks. For this reason, the clever may also employ this function in conjunction with sedist
or equiv.clust
to plot NLIs against clusters of positions within a graph.
Carter T. Butts buttsc@uci.edu
Butts, C.T., and Carley, K.M. (2001). “Multivariate Methods for Interstructural Analysis.” CASOS working paper, Carnegie Mellon University.
gclust.centralgraph
, gdist.plotdiff
, gdist.plotstats
#Create some random graphs
g<-rgraph(10,20,tprob=c(rbeta(10,15,2),rbeta(10,2,15)))
#Find the Hamming distances between them
g.h<-hdist(g)
#Cluster the graphs via their Hamming distances
g.c<-hclust(as.dist(g.h))
#Now display boxplots of density by cluster for a two cluster solution
gclust.boxstats(g.c,2,gden(g))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.