degree                  package:sna                  R Documentation

_C_o_m_p_u_t_e _t_h_e _D_e_g_r_e_e _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:

     'Degree' takes one or more graphs ('dat') and returns the degree
     centralities of positions (selected by 'nodes') within the graphs
     indicated by 'g'.  Depending on the specified mode, indegree,
     outdegree, or total (Freeman) degree 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:

     degree(dat, g=1, nodes=NULL, gmode="digraph", diag=FALSE,
         tmaxdev=FALSE, cmode="freeman", rescale=FALSE)

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

     dat: one or more input graphs. 

       g: integer indicating the index of the graph for which
          centralities are to be calculated (or a vector thereof).  By
          default, 'g'=1. 

   nodes: vector 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 degree centrality being
          computed.  "indegree", "outdegree", and "freeman" refer to
          the indegree, outdegree, and total (Freeman) degree measures,
          respectively.  The default for 'cmode' is "freeman". 

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

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

     Degree centrality is the social networker's term for various
     permutations of the graph theoretic notion of vertex degree:
     indegree of a vertex, v, corresponds to the cardinality of the
     vertex set N^+(v) = {i in V(G) : (i,v) in E(G)}; outdegree
     corresponds to the cardinality of the vertex set N^-(v) = {i in
     V(G) : (v,i) in E(G)}; and total (or "Freeman") degree corresponds
     to |N^+(v)|+|N^-(v)|.  (Note that, for simple graphs,
     indegree=outdegree=total degree/2.)  Obviously, degree centrality
     can be interpreted in terms of the sizes of actors' neighborhoods
     within the larger structure.  See the references below for more
     details.

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

     A vector, matrix, or list containing the degree scores (depending
     on the number and size of the input graphs).

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

     Carter T. Butts buttsc@uci.edu

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

     Freeman, L.C.  (1979).  ``Centrality in Social Networks I:
     Conceptual Clarification.'' _Social Networks_, 1, 215-239.

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

     'centralization'

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

     #Create a random directed graph
     dat<-rgraph(10)
     #Find the indegrees, outdegrees, and total degrees
     degree(dat,cmode="indegree")
     degree(dat,cmode="outdegree")
     degree(dat)

