statnet / lolog

Latent Order Logistic (LOLOG) Graph Models
Other
5 stars 1 forks source link

minDegree() in lolog() gives exactly singular matrix error #11

Open thelondonsimon opened 1 month ago

thelondonsimon commented 1 month ago

I am trying to fit an undirected network using lolog, in which my observed network is the largest component subgraph in a larger network.

When I specify the minDegree(1) network statistic (from LologExtension), lolog frequently (but not always if used in conjunction with just an edges() term) reports an error as it approaches convergence:

library(LologExtension)
fit <- lolog(mynet ~ edges + minDegree(1), verbose = 3)
...
Iteration XX
Error in solve.default(var(auxStats)) : 
  Lapack routine dgesv: system is exactly singular: U[2,2] = 0
Objective: NaN
Error in if (hsCount < nHalfSteps && !is.null(lastTheta) && (invFailed || : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In lolog(mynet ~ edges + minDegree(1), verbose = 3) : 
  Singular statistic covariance matrix. Using diagnoal.

Are there any approaches which can avoid this error? While lolog will sometimes fit the model above without error, I've never been able to do so when also including a gwesp() term.

Thanks, Simon.