gden                   package:sna                   R Documentation

_F_i_n_d _t_h_e _D_e_n_s_i_t_y _o_f _a _G_r_a_p_h

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

     'gden' computes the density of the graphs indicated by 'g' in
     collection 'dat', adjusting for the type of graph in question.

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

     gden(dat, g=NULL, diag=FALSE, mode="digraph")

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

     dat: one or more input graphs. 

       g: integer indicating the index of the graphs for which the
          density is to be calculated (or a vector thereof).  If
          'g==NULL' (the default), density is calculated for all graphs
          in 'dat'. 

    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. 

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

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

     The density of a graph is here taken to be the sum of tie values
     divided by the number of possible ties (i.e., an unbiased
     estimator of the graph mean); hence, the result is interpretable
     for valued graphs as the mean tie value.  The number of possible
     ties is determined by the graph type (and by 'diag') in the usual
     fashion.

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

     The graph density

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

     Carter T. Butts buttsc@uci.edu

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

     Wasserman, S., and Faust, K.  (1994).  _Social Network Analysis:
     Methods and Applications._  Cambridge: Cambridge University Press.

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

     #Draw three random graphs
     dat<-rgraph(10,3)
     #Find their densities
     gden(dat)

