tests/testthat/test-blockdiag.R

test_that("Block-diagonal proposal declination if there are off-block-diagonal edges", {
  y <- network.initialize(20, directed=FALSE)
  y %v% "b" <- rep(1:2, each=10)
  y %ergmlhs% "constraints" <- ~ blockdiag("b")
  
  expect_message(simulate(y~edges, coef=0, verbose=TRUE, control=control.simulate.formula(MCMC.prop=~sparse, MCMC.burnin=1)), ".*ergm.multi:MH_blockdiagTNT.*")

  y[1,11] <- 1
  expect_message(simulate(y~edges, coef=0, verbose=TRUE, control=control.simulate.formula(MCMC.prop=~sparse, MCMC.burnin=1)), ".*ergm:MH_TNT.*")
})

Try the ergm.multi package in your browser

Any scripts or data that you put into this service are public.

ergm.multi documentation built on May 29, 2024, 11:07 a.m.