Learn R Programming

sna (version 2.8)

sedist: Find a Matrix of Distances Between Positions Based on Structural Equivalence

Description

sedist uses the graphs indicated by g in dat to assess the extent to which each vertex is structurally equivalent; joint.analysis determines whether this analysis is simultaneous, and method determines the measure of approximate equivalence which is used.

Usage

sedist(dat, g=c(1:dim(dat)[1]), method="hamming", 
    joint.analysis=FALSE, mode="digraph", diag=FALSE, code.diss=FALSE)

Value

A matrix of similarity/difference scores

Arguments

dat

a graph or set thereof.

g

a vector indicating which elements of dat should be examined.

method

one of "correlation", "euclidean", "hamming", or "gamma".

joint.analysis

should equivalence be assessed across all networks jointly (TRUE), or individually within each (FALSE)?

mode

"digraph" for directed data, otherwise "graph".

diag

boolean indicating whether diagonal entries (loops) should be treated as meaningful data.

code.diss

reverse-code the raw comparison values.

Author

Carter T. Butts buttsc@uci.edu

Details

sedist provides a basic tool for assessing the (approximate) structural equivalence of actors. (Two vertices i and j are said to be structurally equivalent if i->k iff j->k for all k.) SE similarity/difference scores are computed by comparing vertex rows and columns using the measure indicated by method:

  1. correlation: the product-moment correlation

  2. euclidean: the euclidean distance

  3. hamming: the Hamming distance

  4. gamma: the gamma correlation

Once these similarities/differences are calculated, the results can be used with a clustering routine (such as equiv.clust) or an MDS (such as cmdscale).

References

Breiger, R.L.; Boorman, S.A.; and Arabie, P. (1975). ``An Algorithm for Clustering Relational Data with Applications to Social Network Analysis and Comparison with Multidimensional Scaling.'' Journal of Mathematical Psychology, 12, 328-383.

Burt, R.S. (1976). ``Positions in Networks.'' Social Forces, 55, 93-122.

Wasserman, S., and Faust, K. Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.

See Also

equiv.clust, blockmodel

Examples

Run this code
#Create a random graph with _some_ edge structure
g.p<-sapply(runif(20,0,1),rep,20)  #Create a matrix of edge 
                                   #probabilities
g<-rgraph(20,tprob=g.p)            #Draw from a Bernoulli graph 
                                   #distribution

#Get SE distances
g.se<-sedist(g)

#Plot a metric MDS of vertex positions in two dimensions
plot(cmdscale(as.dist(g.se)))

Run the code above in your browser using DataLab