Learn R Programming

graphclust (version 1.3)

rCollectSBM: Simulate a sample of networks of a stochastic block model

Description

Simulate a sample of networks of a stochastic block model

Usage

rCollectSBM(vec_n, theta, directed = TRUE)

Value

list with a list of adjacency matrices ($listGraphs) and a list of node labels ($listLatentZ)

Arguments

vec_n

vector with number of vertices

theta

stochastic block model parameter with latent group probabilities $pi and connectivy parameters $gamma

directed

directed networks (TRUE by default) or undirected (FALSE)

Examples

Run this code
theta1 <- list(pi=c(.5,.5), gamma=matrix((1:4)/8,2,2))
rCollectSBM(2:4, theta1)

Run the code above in your browser using DataLab