rMixSBM function

Simulate a collection of networks of a mixture of stochastic block models

Simulate a collection of networks of a mixture of stochastic block models

rMixSBM(vec_n, thetaMixSBM, directed = TRUE)

Arguments

  • vec_n: vector with number of vertices
  • thetaMixSBM: K-list for a mixture with K components. Each field is a list with the stochastic block model parameter (piandpi and gamma) and a cluster proportion ($prop)
  • directed: directed networks (TRUE by default) or undirected (FALSE)

Returns

list with a list of adjacency matrices (listGraphs),alistofnodelabels(listGraphs), a list of node labels (listLatentZ) and a vector with the graph clustering ($label)

Examples

theta1 <- list(prop=.2, pi=c(.5,.5), gamma=matrix((1:4)/8,2,2)) theta2 <- list(prop=.8, pi=c(.5,.5), gamma=matrix(4:1/8,2,2)) thetaMixSBM <- list(NULL) thetaMixSBM[[1]] <- theta1 thetaMixSBM[[2]] <- theta2 obs <- rMixSBM(vec_n=rep(10,3), thetaMixSBM)
  • Maintainer: Tabea Rebafka
  • License: GPL-2
  • Last published: 2023-06-07

Useful links