# NOT RUN {
## SBM parameters
N <- 300 # number of nodes
Q <- 3 # number of clusters
pi <- rep(1,Q)/Q # block proportion
theta <- list(mean = diag(.45,Q) + .05 ) # connectivity matrix
## simulate an unidrected binary SBM without covariate
sbm <- sbm::sampleSimpleSBM(N, pi, theta)
## Sample network data
# some sampling design and their associated parameters
sampling_parameters <- list(
"dyad" = .3,
"node" = .3,
"double-standard" = c(0.4, 0.8),
"block-node" = c(.3, .8, .5),
"block-dyad" = theta$mean,
"degree" = c(.01, .01),
"snowball" = c(2,.1)
)
observed_networks <- list()
for (sampling in names(sampling_parameters)) {
observed_networks[[sampling]] <-
missSBM::observeNetwork(
adjacencyMatrix = sbm$netMatrix,
sampling = sampling,
parameters = sampling_parameters[[sampling]],
cluster = sbm$memberships
)
}
# }
Run the code above in your browser using DataLab