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

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

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

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

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.