Learn R Programming

sna (version 0.3)

gclust.boxstats: Plot Statistics Associated with Graph Clusters

Description

gclust.boxstats creates side-by-side boxplots of graph statistics based on a hierarchical clustering of networks (cut into k sets).

Usage

gclust.boxstats(h, k, meas, ...)

Arguments

h
An hclust object, presumably formed by clustering a set of structural distances
k
The number of groups to evaluate
meas
A vector of length equal to the number of graphs in h, containing a GLI to be evaluated
...
Additional parameters to boxplot

Value

  • None

Requires

mva

Details

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.

References

Butts, C.T., and Carley, K.M. (2001). ``Multivariate Methods for Interstructural Analysis.'' CASOS working paper, Carnegie Mellon University.

See Also

gclust.centralgraph, gdist.plotdiff, gdist.plotstats

Examples

Run this code
#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
library(mva)     #Load the mva library
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))

Run the code above in your browser using DataLab