Learn R Programming

sna (version 2.8)

gdist.plotdiff: Plot Differences in Graph-level Statistics Against Inter-graph Distances

Description

For a given graph set, gdist.plotdiff plots the distances between graphs against their distances (or differences) on a set of graph-level measures.

Usage

gdist.plotdiff(d, meas, method="manhattan", jitter=TRUE, 
    xlab="Inter-Graph Distance", ylab="Measure Distance", 
    lm.line=FALSE, ...)

Value

None

Arguments

d

A matrix containing the inter-graph distances

meas

An n x m matrix containing the graph-level indices; rows of this matrix must correspond to graphs, and columns to indices

method

The distance method used by dist to establish differences/distances between graph GLI values. By default, absolute ("manhattan") differences are used.

jitter

Should values be jittered prior to display?

xlab

A label for the X axis

ylab

A label for the Y axis

lm.line

Include a least-squares line?

...

Additional arguments to plot

Author

Carter T. Butts buttsc@uci.edu

Details

gdist.plotdiff works by taking the distances between all graphs on meas and then plotting these distances against d for all pairs of graphs (with, optionally, an added least-squares line for reference value). This can be a useful exploratory tool for relating inter-graph distances (e.g., Hamming distances) to differences on other attributes.

References

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

See Also

gdist.plotstats, gclust.boxstats, gclust.centralgraph

Examples

Run this code
#Generate some random graphs with varying densities
g<-rgraph(10,20,tprob=runif(20,0,1))

#Find the Hamming distances between graphs
g.h<-hdist(g)

#Plot the relationship between distance and differences in density
gdist.plotdiff(g.h,gden(g),lm.line=TRUE)

Run the code above in your browser using DataLab