0

My code is

gw1_help <- ergm.tapered(
  supnet ~ edges + nodefactor("work") + nodefactor("income") +
    nodefactor("edu") + nodefactor("religious") + nodefactor("gender") + 
    nodecov("age") + edgecov(sup_loca2_net,"distance") + edgecov(kin_sup,"kinweight") +
    gwidegree(.1, T) + gwesp(.1, T) + gwdsp(.1, T), 
  control = control.ergm.tapered(
    MCMC.samplesize = 1e+5, 
    MCMC.burnin = 1e+6, 
    MCMC.interval = 1000, 
    seed = 567
  ), 
  eval.loglik = T, 
  verbose = T
) 

and I also tried the ergm model. Both models couldn't work out, and the ergm.tapered model gives this feedback:

Error in ergm.MCMLE(init, nw, model, initialfit = (initialfit <- NULL), : Unconstrained MCMC sampling did not mix at all. Optimization cannot continue. ")

So I was wondering if this is a problem of my data & code, or it's a bug that could be fixed! Thank you!

Michał
  • 2,755
  • 1
  • 17
  • 20
cccbc
  • 13
  • 3

1 Answers1

0

I bet it is a problem with model specification. I'd suggest starting with a much simpler model (e.g. with dyad-independent terms only), investigate GOF and then proceed with adding more terms as necessary in smaller steps.

Michał
  • 2,755
  • 1
  • 17
  • 20
  • Thanks! I have tried models with the same variables without gw-terms, which is the main-effect model, which worked well. I tried removing gwesp and gwdsp and adding "r=1" to ergm.tapered, but it also reported the same error. – cccbc Apr 13 '23 at 01:49
  • Still, I think it is model vs data rather than a bug in the software. Did GOF suggest you are for sure missing closure-related terms? Did you try a specification with either `gwesp` or `gwdsp` but not both? – Michał Apr 13 '23 at 12:45