# NOT RUN {
## SBM parameters
directed <- FALSE
N <- 300 # number of nodes
Q <- 3 # number of clusters
alpha <- rep(1,Q)/Q # mixture parameter
pi <- diag(.45,Q) + .05 # connectivity matrix
## simulate a SBM without covariates
sbm <- missSBM::simulate(N, alpha, pi, directed)
## Sample network data
samplingParameters <- .5 # the sampling rate
sampling <- "dyad" # the sampling design
sampledNet <- missSBM::sample(sbm$adjacencyMatrix, sampling, samplingParameters)
## Inference :
vBlocks <- 1:5 # number of classes
collection <- missSBM::estimate(sampledNet, vBlocks, sampling)
collection$ICL
# }
Run the code above in your browser using DataLab