bccm is used to fit a block-constrained configuration model.

bccm(
  adj,
  labels,
  directed = NULL,
  selfloops = NULL,
  directedBlocks = FALSE,
  homophily = FALSE,
  inBlockOnly = FALSE,
  xi = NULL,
  regular = FALSE,
  ...
)

# S3 method for bccm
print(x, suppressCall = FALSE, ...)

Arguments

adj

the adjacency matrix of the graph.

labels

vector or list. contains the vertex labels to generate the blocks in the bccm. In the case of bipartite graphs should be a list of two vectors, the first one with row labels and the second one with column labels.

directed

a boolean argument specifying whether the graph is directed or not.

selfloops

boolean argument specifying whether the model should incorporate selfloops.

directedBlocks

boolean argument specifying whether the model should incorporate directed blocks. Default to FALSE.

homophily

boolean argument specifying whether the model should fit only homophily blocks. Default to FALSE.

inBlockOnly

boolean argument specifying whether the model should fit only blocks over the diagonal. Default to FALSE.

xi

an optional matrix defining the combinatorial matrix of the model.

regular

optional boolean, fit regular gnp model? if not specified chosen through lr.test.

...

optional arguments to print or plot methods.

x

object of class 'bccm'

suppressCall

logical, indicating whether to print the call that generated x

Value

bccm returns an object of class 'bccm' and 'ghype'. 'bccm' objects expand 'ghype' objects incorporating the parameter estimates.

Methods (by generic)

  • print(bccm): Print method for elements of class 'bccm'.

See also

bccm

Examples

data("vertexlabels","adj_karate")
blockmodel <- bccm(adj = adj_karate, labels = vertexlabels, directed = FALSE, selfloops = FALSE)

data('adj_karate')
data('vertexlabels')
bcc.model <- bccm(adj_karate, labels=vertexlabels, directed=FALSE, selfloops=FALSE)
print(bcc.model)
#> Call:
#> bccm(adj = adj_karate, labels = vertexlabels, directed = FALSE, 
#>     selfloops = FALSE)
#> block ghype undirected , no selfloops 
#> 34 vertices, 231 edges 
#> Loglikelihood:
#> -336.8385
#> df: 36 
#> 
#> Coefficients:
#>         Estimate    Std.Err t value    Pr(>t)    
#> 1<->1 1.00000000 0.00000000     Inf < 2.2e-16 ***
#> 1<->2 0.09044494 0.00021692  416.95 < 2.2e-16 ***
#> 2<->2 0.91049902 0.00040434 2251.79 < 2.2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1