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

View source: R/gmultiv.R

gdist.plotdiffR Documentation

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, ...)

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

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.

Value

None

Note

This function is actually quite generic, and can be used with node-level – or even non-network – data as well.

Author(s)

Carter T. Butts buttsc@uci.edu

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

#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)

sna documentation built on Sept. 11, 2024, 8:45 p.m.

Related to gdist.plotdiff in sna...