Skip to content

Commit

Permalink
Fixed a typo exposed by a fix in statnet.common::trim_env() that affe…
Browse files Browse the repository at this point in the history
…cted initialization of constrained MH proposal when it requested auxiliaries.
  • Loading branch information
krivit committed Dec 22, 2024
1 parent e71e4fc commit e04e056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ergm.R
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ ergm <- function(formula, response=NULL,
model.obs <- NULL
if(identical(proposal$auxiliaries, proposal.obs$auxiliaries)){
## Reuse auxiliaries from the unconstrained proposal if identical.
proposal.obs$slots.extra.aux <- model$slots.extra.aux$proposal
proposal.obs$aux.slots <- model$slots.extra.aux$proposal
}else if(!is.null(proposal.obs$auxiliaries)){
if (verbose) message("Constrained proposal requires different auxiliaries: reinitializing model...")
model.obs <- ergm_model(formula, nw, extra.aux = NVL3(proposal.obs$auxiliaries,list(proposal=.)), term.options=control$term.options)
Expand Down

0 comments on commit e04e056

Please sign in to comment.