From 11e3630e3ed5c7dc2b6c9a8ab9ce092a3c25b389 Mon Sep 17 00:00:00 2001
From: "Pavel N. Krivitsky"
Date: Sat, 12 Oct 2024 20:08:11 +1100
Subject: [PATCH] ergm_model.ergm_model() no longer clears auxiliaries if the
model consists entirely of auxiliaries.
---
DESCRIPTION | 4 ++--
R/ergm_model.R | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 7d4db28a..bcf0751e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: ergm
-Version: 4.7-7435
-Date: 2024-10-11
+Version: 4.7-7439
+Date: 2024-10-12
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/ergm_model.R b/R/ergm_model.R
index 454eb35d..3fdf4d3b 100644
--- a/R/ergm_model.R
+++ b/R/ergm_model.R
@@ -127,7 +127,8 @@ ergm_model.ergm_model <- function(object, nw, ..., env=globalenv(), extra.aux=li
## If initialized auxiliaries are present, get rid of them.
np <- nparam(model, byterm = TRUE, canonical = TRUE)
- model$terms <- model$terms[np != 0]
+ if(any(np != 0))
+ model$terms <- model$terms[np != 0]
if(!terms.only){
model <- ergm.auxstorage(model, nw, term.options=model$term.options, extra.aux=extra.aux)