statnet / ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks
Other
98 stars 37 forks source link

In missing data MLE, ergm.estimate()'s Hessian based on the original matrices can be non-SPD, if the Hummel step length < 1. #551

Closed krivit closed 10 months ago

krivit commented 10 months ago

Steps to reproduce:

  1. Download and extract ergm.estimate.rds.
  2. Execute:
    library(ergm)
    e <- readRDS("ergm.estimate.rds")
    do.call(ergm:::ergm.estimate, e)

What appears to be happening is that:

  1. Constrained statistic matrix is shifted and scaled in accordance to the Hummel step length.
  2. MCMLE or lognormal approximation is used to update the parameter estimates.
  3. Importance sampling Hessian is recalculated with the original stats matrices.

Even if the Hessian on the shifted and scaled has to be SPD for estimation to succeed, the Hessian for the original stats matrices (which is what must be used to compute the standard errors) isn't guaranteed to be.

The simplest solution is probably to just return NA for the Hessian and its inverse, but that could have downstream effects on, e.g., convergence testing.