[statnet_help] error in ergm-term triangle

Carter T. Butts buttsc at uci.edu
Wed Jun 15 22:21:36 PDT 2022


Hi, Longxia -

This is not a bug: the model families you are fitting are usually
degenerate in social networks.  The edge-triangle family is particularly
infamous in that regard - you can find the first results on that one in
Strauss's 1986 SIAM paper, and it has been the target of many other
theoretical studies.  We love to work with it as a theoretical and
didactic tool for understanding how ERGMs work, but it is rarely useful
in empirical models.  (It can have uses when the triangle parameter is
/negative/, but that doesn't happen in most social networks. /Local/
triangle terms can also work, but only when confined to very small
groups.  So, while there are exceptions, one should not be surprised to
find that an edge-triangle model fails when modeling social networks.)

Without belaboring the point on why this goes bad (as noted, there's a
whole literature on that), the basic intuition is that a positive
triangle term "says" that every shared partner of an i,j pair should
increase the conditional log-odds of an i,j tie by a constant unit. 
That sounds harmless, but in practice it leads to runaway triangle
formation: once triangles form, they don't break, and triangles beget
more triangles without limit.  (This is the "density explosion" route to
degeneracy.)  In the end, the MCMC simulation that is being used to fit
your model tells you that something has gone horribly wrong, and quits. 
That's not a bug: what this is telling you is that the model you are
positing, is incompatible with your data.

As you correctly observe, GWESP is an alternative parameterization that
is less prone to the density explosion, and it often works very well. 
Very approximately speaking, it works by implementing diminishing
marginal effects for the impact of shared partners on tie formation: the
first matters more than the second, the second matters more than the
third, etc.  This fall-off is controlled by the decay parameter.  If the
decay parameter is too large, then the decay will be too slow, and you
will wind up right back in the same regime you were in with the triangle
term; how large is too large is case specific, but if you find that the
model stops mixing, it's a good idea to reduce the parameter and try
again.  Although there are no (and cannot be) general rules, 0.25 is
often a reasonable starting value for many social networks.  I would try
much smaller values, and see if that helps.

Another general issue is that your model is depending on a homogeneous
clustering effect to explain all of the excess triangulation in the
graph.  In real-world social networks, much triangulation usually
results from inhomogeneities (e.g., non-uniform mixing due to
demographics, shared social settings, exogenous group memberships,
etc.), which produce a "patchy" and uneven distribution of triangles
that is not similar to what is generated by homogeneous terms (e.g.,
triangles, GWESP, ESPs). Fitting such networks with edges + GWESP forces
the model to struggle between putting too few triangles in the parts of
the network that need them, and putting too many in the parts that don't
- the results are often disappointing.  The solution here is to use
covariate effects to capture differential mixing, and then to add GWESP
and other dependence terms to "mop up" what cannot be captured via
covariate effects.  This is something that we used to cover in our ergm
workshop, so you may want to check our online workshop materials.  I'm
not certain if it's still in the latest version (since various topics
and examples get rotated in and out over time), but if not, it should be
in some of the older ones.

So, in sum:

1. Avoid triangle terms, unless you know that you are in one of those
special exceptional cases where they are useful (and if they aren't
working, you aren't in one of those situations!);

2. When in doubt, try starting GWESP with small decay parameters (0.25
or less is often, though not always, reasonable when trying to get a
model to fit the first time);

3. Start by visualizing your network and trying to understand its
sources of triangulation; account for those first using covariate
effects, and then add dependence terms if/as needed to mop up what those
couldn't capture.

Hope that helps,

-Carter

On 6/15/22 6:19 PM, 霍龙霞 wrote:

> Hi all,

> I use the ergm to model the formation of network. but it is always

> degeneracy. there are 43 nodes, 492 edeges, 3562 triangles. i use the

> code as follow:

> /

> /

> /ergm1<-ergm(net1~edges+triangle,control=control.ergm(seed=2345))/

> /

> /

> The error message popppes up:

>

> /Model statistics ‘triangle’ are not varying. This may indicate that

> the observed data occupies an extreme point in the sample space or

> that the estimation has reached a dead-end configuration./

> /

> /

> I also try to use gwesp to solve model degeneracy. the code as follow

>

> /ergm1<-ergm(net1~edges+gwesp(0.5, fixed =

> TRUE),control=control.ergm(seed=2345))/

> /

> /

> However, it doesn't work, either. And the error as follows:

>

> /Iteration 2 of at most 60:/

> /Error in ergm.MCMLE(init, nw, model, initialfit = (initialfit <-

> NULL),  :

>   Unconstrained MCMC sampling did not mix at all. Optimization cannot

> continue.

> In addition: Warning message:

> In ergm_MCMC_sample(s, control, theta = mcmc.init, verbose =

> max(verbose -  :

>   Unable to reach target effective size in iterations alotted./

> /

> /

> I want to know is there any solution to fix this error?

> Thank you very much!

>

> Best,

> Longxia Huo

> Ph.D. Student

>

>

> _______________________________________________

> statnet_help mailing list

> statnet_help at u.washington.edu

> https://urldefense.com/v3/__http://mailman13.u.washington.edu/mailman/listinfo/statnet_help__;!!CzAuKJ42GuquVTTmVmPViYEvSg!MEpJKUWuuhzOb4dbedz9CP8vReuII3z5EQcaUBdOHJhs7smhlyKxWK7zoy6WF4vaYfJJKJo9TK3LsXVf7hA$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20220615/39add128/attachment.html>


More information about the statnet_help mailing list