formula <- list(mutuality, popularity, OTPtransitivity)
X <- matrix(sample(c(0,1), size = 9**2, replace = TRUE), nrow = 9)
diag(X) <- 0
M <- matrix(c(0.1, 0.8, 0.1, 0.5), nrow = 2)
partition <- c(1, 2, 2, 1, 1, 2, 2, 2, 1)
res <- nemBM(X = X, partition = partition, formula = formula,
theta = c(1, 1, 1), M = M, k = 100, loops = FALSE)
Run the code above in your browser using DataLab