sedist {sna} | R Documentation |
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.
sedist(dat, g=c(1:dim(dat)[1]), method="hamming", joint.analysis=FALSE, mode="digraph", diag=FALSE, code.diss=FALSE)
dat |
A graph or graph stack |
g |
A vector indicating which elements of dat should be examined |
method |
One of ?correlation? , ?euclidean? , ?hamming? , and ?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 |
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
:
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
).
A matrix of similarity/difference scores
Be careful to verify that you have computed what you meant to compute, with respect to similarities/differences. Also, note that (despite its popularity) the product-moment correlation can give rather strange results in some cases.
Carter T. Butts buttsc@uci.edu
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.
#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 library(mva) plot(cmdscale(as.dist(g.se)))