Skip to content

Commit

Permalink
Fixed a bug in simulate.ergm_model() that would cause problems if the…
Browse files Browse the repository at this point in the history
… proposal requested an auxiliary *and* a monitor= model was in effect.
  • Loading branch information
krivit committed Feb 6, 2024
1 parent 1eec7b9 commit acfa597
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ergm
Version: 4.6-7340
Date: 2024-02-05
Version: 4.6-7346
Date: 2024-02-06
Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks
Authors@R: c(
person(c("Mark", "S."), "Handcock", role=c("aut"), email="[email protected]"),
Expand Down
4 changes: 4 additions & 0 deletions R/simulate.ergm.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ simulate.ergm_model <- function(object, nsim=1, seed=NULL,
if (verbose) message(sQuote(paste0(proposal$pkgname,":MH_",proposal$name)),".")
}

proposal$aux.slots <- m$slots.extra.aux$proposal

## TODO: In principle, we can initialize an empty model with just
## the auxiliary and append it to the model.
if(length(proposal$auxiliaries) && !length(m$slots.extra.aux$proposal))
stop("The proposal appears to be requesting auxiliaries, but the initialized model does not export any proposal auxiliaries.")

Expand Down

0 comments on commit acfa597

Please sign in to comment.