Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blockmodel.expand

Generate a Graph (or Stack) from a Given Blockmodel Using Particular Expansion Rules


Description

blockmodel.expand takes a blockmodel and an expansion vector, and expands the former by making copies of the vertices.

Usage

blockmodel.expand(b, ev, mode="digraph", diag=FALSE)

Arguments

b

blockmodel object.

ev

a vector indicating the number of copies to make of each class (respectively).

mode

a string indicating whether the result should be a “graph” or “digraph”.

diag

a boolean indicating whether or not loops should be permitted.

Details

The primary use of blockmodel expansion is in generating test data from a blockmodeling hypothesis. Expansion is performed depending on the content type of the blockmodel; at present, only density is supported. For the density content type, expansion is performed by interpreting the interclass density as an edge probability, and by drawing random graphs from the Bernoulli parameter matrix formed by expanding the density model. Thus, repeated calls to blockmodel.expand can be used to generate a sample for monte carlo null hypothesis tests under a Bernoulli graph model.

Value

An adjacency matrix, or stack thereof.

Note

Eventually, other content types will be supported.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Doreian, P.; Batagelj, V.; and Ferligoj, A. (2005). Generalized Blockmodeling. Cambridge: Cambridge University Press.

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.

See Also

Examples

#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 15
b<-blockmodel(g,eq,h=15)

#Draw from an expanded density blockmodel
g.e<-blockmodel.expand(b,rep(2,length(b$rlabels)))  #Two of each class
g.e

sna

Tools for Social Network Analysis

v2.6
GPL (>= 2)
Authors
Carter T. Butts [aut, cre, cph]
Initial release
2020-10-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.