# \donttest{
data(Lazega)
# Construct a multilayer network for ergm(). (See `?Layer` for syntax.)
LLazega <- Layer(Lazega, c("advice", "coworker", "friendship"))
# Specify a layer logic model.
efit <- ergm(LLazega ~ L(~edges + mutual, ~advice) +
L(~edges + mutual, ~coworker) +
L(~edges + mutual, ~friendship) +
L(~edges + mutual, ~advice&coworker) +
L(~edges + mutual, ~advice&friendship) +
L(~edges + mutual, ~coworker&friendship))
summary(efit)
# }
Run the code above in your browser using DataLab