Skip to content

Commit

Permalink
In ergm.estimate(), if the steplen < 1 and the unshrunken Hessian is …
Browse files Browse the repository at this point in the history
…not SNND, return NA in its place.

fixes #551
  • Loading branch information
krivit committed Jan 22, 2024
1 parent eed8b5a commit ff704e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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.6-7294
Date: 2024-01-10
Version: 4.6-7303
Date: 2024-01-22
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
4 changes: 2 additions & 2 deletions R/ergm.estimate.R
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ ergm.estimate<-function(init, model, statsmatrices, statsmatrices.obs=NULL,
eta0=eta0, etamap=etamap.no
)
}

covar <- matrix(NA, ncol=length(theta), nrow=length(theta))
covar[!model$etamap$offsettheta, !model$etamap$offsettheta] <- sginv(-Lout$hessian, tol=.Machine$double.eps^(3/4))
covar[!model$etamap$offsettheta, !model$etamap$offsettheta] <- ERRVL(try(sginv(-Lout$hessian, tol=.Machine$double.eps^(3/4)), TRUE), NA)
dimnames(covar) <- list(names(theta),names(theta))
He <- matrix(NA, ncol=length(theta), nrow=length(theta))
He[!model$etamap$offsettheta, !model$etamap$offsettheta] <- Lout$hessian
Expand Down

0 comments on commit ff704e4

Please sign in to comment.