0

i was using statnet to fit ergm model in r, and my code is

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

and this run quite well.

However, when i add another two nodecov representing education and income, like

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

the outcome collapsed, while reporting: "Error in T2nullity && verbose : invalid 'x' type in 'x && y'"

I searched severall questions in Github but they solve the problem by deleting some of the variables, but i cannot do that since all variables are important.

cccbc
  • 13
  • 3

0 Answers0