Skip to content

Commit

Permalink
nobs.ergm() now gets its information from ergm$info$n_info_dyads if a…
Browse files Browse the repository at this point in the history
…vailable.

fixes #574
  • Loading branch information
krivit committed Dec 29, 2024
1 parent 20107f8 commit 0054884
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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.8.0-7524
Date: 2024-12-27
Version: 4.8.0-7525
Date: 2024-12-29
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
5 changes: 2 additions & 3 deletions R/logLik.ergm.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,8 @@ nobs.ergm <- function(object, ...){
warning("The number of observed dyads in this network is ill-defined due to complex constraints on the sample space. Disable this warning with ",sQuote("options(ergm.loglik.warn_dyads=FALSE)"),".")
}

NVL3(NVL(object$mple.null.lik, object$mple.lik, object$null.lik, object$mle.lik),
attr(.,"nobs"),
object$info$n_info_dyads)
object$info$n_info_dyads %||%
attr(NVL(object$mple.null.lik, object$mple.lik, object$null.lik, object$mle.lik), "obs")
}

NO_NULL_IMPLICATION <- "This means that all likelihood-based inference (LRT, Analysis of Deviance, AIC, BIC, etc.) is only valid between models with the same reference distribution and constraints."
Expand Down

0 comments on commit 0054884

Please sign in to comment.