diff --git a/DESCRIPTION b/DESCRIPTION index f78cbbf9..0ad2a7c2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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="handcock@stat.ucla.edu"), diff --git a/R/logLik.ergm.R b/R/logLik.ergm.R index a4772bb7..46db5187 100644 --- a/R/logLik.ergm.R +++ b/R/logLik.ergm.R @@ -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."