Skip to content

Commit

Permalink
Make it possible to disable the MPLE existence check.
Browse files Browse the repository at this point in the history
references #570
  • Loading branch information
krivit committed Sep 29, 2024
1 parent c982534 commit 8e81057
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: ergm
Version: 4.7-7393
Version: 4.7-7394
Date: 2024-09-29
Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks
Authors@R: c(
Expand Down
6 changes: 5 additions & 1 deletion R/control.ergm.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
#' simulate, the MCMC burn-in, and the MCMC interval for `Godambe`
#' and `bootstrap` methods.
#'
#' @param MPLE.check If `TRUE` (the default), perform the MPLE
#' existence check described by \insertCite{ScHu23c;textual}{ergm}.
#'
#' @param MPLE.constraints.ignore If `TRUE`, MPLE will ignore all
#' dyad-independent constraints except for those due to attributes
#' missingness. This can be used to avert evaluating and storing the
Expand Down Expand Up @@ -523,7 +526,8 @@ control.ergm<-function(drop=TRUE,
MPLE.covariance.method ="invHess",
MPLE.covariance.sim.burnin = 1024,
MPLE.covariance.sim.interval = 1024,
MPLE.constraints.ignore=FALSE,
MPLE.check = TRUE,
MPLE.constraints.ignore = FALSE,

MCMC.prop=trim_env(~sparse + .triadic),
MCMC.prop.weights="default", MCMC.prop.args=list(),
Expand Down
2 changes: 1 addition & 1 deletion R/ergm.mple.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ergm.mple<-function(s, s.obs, init=NULL,

# test whether the MPLE actually exists
# FIXME: Figure out how to test for MPLE's existence in penalised and curved MPLEs.
if(! control$MPLE.type%in%c("penalized","logitreg")) mple.existence(pl)
if(control$MPLE.check && ! control$MPLE.type%in%c("penalized","logitreg")) mple.existence(pl)

message("Maximizing the pseudolikelihood.")
if(control$MPLE.type=="penalized"){
Expand Down
4 changes: 4 additions & 0 deletions man/control.ergm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8e81057

Please sign in to comment.