sedist                  package:sna                  R Documentation

_F_i_n_d _a _M_a_t_r_i_x _o_f _D_i_s_t_a_n_c_e_s _B_e_t_w_e_e_n _P_o_s_i_t_i_o_n_s _B_a_s_e_d _o_n _S_t_r_u_c_t_u_r_a_l _E_q_u_i_v_a_l_e_n_c_e

_D_e_s_c_r_i_p_t_i_o_n:

     `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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

     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

_D_e_t_a_i_l_s:

     `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').

_V_a_l_u_e:

     A matrix of similarity/difference scores

_N_o_t_e:

     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.

_A_u_t_h_o_r(_s):

     Carter T. Butts ctb@andrew.cmu.edu

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     `equiv.clust', `blockmodel'

_E_x_a_m_p_l_e_s:

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

