Skip to content

Commit 0054884

Browse files
committed
nobs.ergm() now gets its information from ergm$info$n_info_dyads if available.
fixes #574
1 parent 20107f8 commit 0054884

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ergm
2-
Version: 4.8.0-7524
3-
Date: 2024-12-27
2+
Version: 4.8.0-7525
3+
Date: 2024-12-29
44
Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks
55
Authors@R: c(
66
person(c("Mark", "S."), "Handcock", role=c("aut"), email="handcock@stat.ucla.edu"),

R/logLik.ergm.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,8 @@ nobs.ergm <- function(object, ...){
201201
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)"),".")
202202
}
203203

204-
NVL3(NVL(object$mple.null.lik, object$mple.lik, object$null.lik, object$mle.lik),
205-
attr(.,"nobs"),
206-
object$info$n_info_dyads)
204+
object$info$n_info_dyads %||%
205+
attr(NVL(object$mple.null.lik, object$mple.lik, object$null.lik, object$mle.lik), "obs")
207206
}
208207

209208
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."

0 commit comments

Comments
 (0)