n <- 10
p1 <- matrix(
data = c(0.1, 0.4, 0.1, 0.4,
0.4, 0.4, 0.1, 0.4,
0.1, 0.1, 0.4, 0.4,
0.4, 0.4, 0.4, 0.4),
nrow = 4,
ncol = 4,
byrow = TRUE
)
p2 <- matrix(
data = c(0.1, 0.4, 0.4, 0.4,
0.4, 0.4, 0.4, 0.4,
0.4, 0.4, 0.1, 0.1,
0.4, 0.4, 0.1, 0.4),
nrow = 4,
ncol = 4,
byrow = TRUE
)
sim <- sample2_sbm(n, 68, p1, c(17, 17, 17, 17), p2, seed = 1234)
Run the code above in your browser using DataLab