library(ergm)
data(fivenets)
fivenets2 <- blockdiagonalize(fivenets, attrname = "block") # A network with
ans0 <- ergm(
fivenets2 ~ edges + nodematch("female"),
constraints = ~blockdiag("block")
)
ans1 <- ergmito(fivenets ~ edges + nodematch("female"))
# This is equivalent
ans2 <- ergm_blockdiag(fivenets ~ edges + nodematch("female"))
Run the code above in your browser using DataLab