Closed krivit closed 2 years ago
library(ergm.multi) set.seed(70) nw0 <- network.initialize(10, dir=FALSE) (nw1 <- simulate(nw0~edges, coef=-.5)) (nw2 <- simulate(nw0~edges, coef=+.5)) (layer <- coef(ergm(Layer(nw1, nw2) ~ L(~edges, ~`1`) + L(~edges, ~`2`)))) #> L(1)~edges L(2)~edges #> 0.04445176 0.22314355 (logic <- c(coef(ergm(nw1~edges)), coef(ergm(nw2~edges)))) #> edges edges #> 0.04445176 0.22314355 stopifnot(isTRUE(all.equal(layer, logic, check.attributes=FALSE))) #> Error: isTRUE(all.equal(layer, logic, check.attributes = FALSE)) is not TRUE
Created on 2022-07-03 by the reprex package (v2.0.1)
Created on 2022-07-03 by the reprex package (v2.0.1)