blockmodel                package:sna                R Documentation

_G_e_n_e_r_a_t_e _B_l_o_c_k_m_o_d_e_l_s _B_a_s_e_d _o_n _P_a_r_t_i_t_i_o_n_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:

     Given an equivalence clustering object and a graph stack,
     'blockmodel' will form a blockmodel of the graph stack based on
     the classes in question, using the specified block content type.

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

     blockmodel(dat, ec, k=NULL, h=NULL, block.content="density", 
         plabels=ec$plabels, glabels=ec$glabels, rlabels=NULL, 
         mode="digraph", diag=FALSE)

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

     dat: A graph stack 

      ec: An object of class 'equiv.clust' 

       k: The number of classes to form (using 'cutree') 

       h: The height at which to split classes (using 'cutree') 

block.content: String indicating block content type (see below)

 plabels: A vector of labels to be applied to the individual nodes

 glabels: A vector of labels to be applied to the graphs being modeled 

 rlabels: A vector of labels to be applied to the (reduced) roles 

    mode: A string indicating whether we are dealing with graphs or
          digraphs 

    diag: A boolean indicating whether loops are permitted 

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

     'blockmodel' forms its eponymous models by using 'cutree' to cut
     an equivalence clustering in the fashion specified by 'k' and 'h'.
      After forming clusters (roles), the input graphs are reordered
     and blockmodel reduction is applied.  Currently supported
     reductions are:

        1.  'density': block density, computed as the mean value of the
           block

        2.  'meanrowsum': mean row sums for the block

        3.  'meancolsum': mean column sums for the block

        4.  'sum': total block sum

        5.  'median': median block value

        6.  'min': minimum block value

        7.  'max': maximum block value

        8.  'types': semi-intelligent coding of blocks by ``type.'' 
           Currently recognized types are (in order of precedence)
           ``'NA''' (i.e., blocks with no valid data), ``null'' (i.e.,
           all values equal to zero), ``complete'' (i.e., all values
           equal to 1), ``1 covered'' (i.e., all rows/cols contain a
           1), ``1 row-covered'' (i.e., all rows contain a 1), ``1
           col-covered'' (i.e., all cols contain a 1), and ``other''
           (i.e., none of the above). 

     Density or median-based reductions are probably the most
     interpretable for most conventional analyses, though type-based
     reduction can be useful in examining certain equivalence class
     hypotheses (e.g., 1 covered and null blocks can be used to infer
     regular equivalence classes).  Once a given reduction is
     performed, the model can be analyzed and/or expansion can be used
     to generate new graphs based on the inferred role structure.

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

     An object of class 'blockmodel'.

_N_o_t_e:

     The 'mva' library is required for 'blockmodel' to function.

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

     Carter T. Butts buttsc@uci.edu

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

     White, H.C.; Boorman, S.A.; and Breiger, R.L.  (1976).  ``Social
     Structure from Multiple Networks I: Blockmodels of Roles and
     Positions.''  _American Journal of Sociology_, 81, 730-779.

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

     'equiv.clust', 'blockmodel.expand'

_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

     #Cluster based on structural equivalence
     eq<-equiv.clust(g)

     #Form a blockmodel with distance relaxation of 10
     b<-blockmodel(g,eq,h=10)
     plot(b)                            #Plot it

