graphcent                package:sna                R Documentation

_C_o_m_p_u_t_e _t_h_e (_H_a_r_a_r_y) _G_r_a_p_h _C_e_n_t_r_a_l_i_t_y _S_c_o_r_e_s _o_f _N_e_t_w_o_r_k _P_o_s_i_t_i_o_n_s

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

     'graphcent' takes a graph stack ('dat') and returns the Harary
     graph centralities of positions within one graph (indicated by
     'nodes' and 'g', respectively).  Depending on the specified mode,
     graph centrality on directed or undirected geodesics will be
     returned; this function is compatible with 'centralization', and
     will return the theoretical maximum absolute deviation (from
     maximum) conditional on size (which is used by 'centralization' to
     normalize the observed centralization score).

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

     graphcent(dat, g=1, nodes=c(1:dim(dat)[2]), gmode="digraph", 
         diag=FALSE, tmaxdev=FALSE, cmode="directed", 
         geodist.precomp=NULL, rescale=FALSE)

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

     dat: Data array to be analyzed.  By assumption, the first
          dimension of the array indexes the graph, with the next two
          indexing the actors. Alternately, this can be an n x n matrix
          (if only one graph is involved). 

       g: Integer indicating the index of the graph for which
          centralities are to be calculated.  By default, 'g==1'. 

   nodes: List indicating which nodes are to be included in the
          calculation.  By default, all nodes are included. 

   gmode: String indicating the type of graph being evaluated. 
          "digraph" indicates that edges should be interpreted as
          directed; "graph" indicates that edges are undirected. 
          'gmode' is set to "digraph" by default. 

    diag: Boolean indicating whether or not the diagonal should be
          treated as valid data.  Set this true if and only if the data
          can contain loops.  'diag' is 'FALSE' by default. 

 tmaxdev: Boolean indicating whether or not the theoretical maximum
          absolute deviation from the maximum nodal centrality should
          be returned.  By default, 'tmaxdev==FALSE'. 

   cmode: String indicating the type of graph centrality being computed
          (directed or undirected geodesics). 

geodist.precomp: A 'geodist' object precomputed for the graph to be
          analyzed (optional) 

 rescale: If true, centrality scores are rescaled such that they sum to
          1. 

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

     The Harary graph centrality of a vertex v is equal to 1/(max_u
     d(v,u)), where d(v,u) is the geodesic distance from v to u. 
     Vertices with low graph centrality scores are likely to be near
     the ``edge'' of a graph, while those with high scores are likely
     to be near the ``middle.''  Compare this with 'closeness', which
     is based on the reciprocal of the sum of distances to all other
     vertices (rather than simply the maximum).

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

     A vector containing the centrality scores

_N_o_t_e:

     Judicious use of 'geodist.precomp' can save a great deal of time
     when computing multiple path-based indices on the same network.

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

     Carter T. Butts buttsc@uci.edu

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

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

     'centralization'

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

     g<-rgraph(10)     #Draw a random graph with 10 members
     graphcent(g)    #Compute centrality scores

