n <- 5L
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)
m <- as.integer(c(rep(1, 17), rep(2, 17), rep(3, 17), rep(4, 17)))
test2_local(sim$x, sim$y, m,
seed = 1234,
alpha = 0.05,
B = 19)
Run the code above in your browser using DataLab