Skip to content

ERGM approximation formulas ​

This page documents the formulas used by the initial relationalstats.ergm implementation.

The current implementation is a dyadic-logistic approximation. It is not a full MCMC-MLE ERGM engine and should not be described as equivalent to R ergm.

Dyadic logistic approximation ​

For a candidate dyad (i, j), the model uses:

Pr(Yij=1)=logit−1(∑k=1pβkxijk)

Equivalently:

log⁡(Pr(Yij=1)1−Pr(Yij=1))=∑k=1pβkxijk

The implementation uses add_intercept=False internally because the edges term acts as the baseline edge-propensity term.

Edges term ​

xij,edges=1

Common-neighbor term ​

xij,common_neighbors=|N(i)∩N(j)|

Transitivity proxy ​

xij,transitiveties=|N(i)∩N(j)|

This is a dyad-level approximation, not a full ERGM change statistic.

Degree-one term ​

xij,degree1={1,if di=1 or dj=10,otherwise

GWESP approximation ​

xij,gwesp=1−(1−e−α)sij

where:

sij=|N(i)∩N(j)|

and the default decay parameter is:

α=0.5

This approximates the intuition of geometrically weighted shared partners, but it is not the full curved ERGM GWESP term used by R ergm.

Nodematch term ​

A nodematch term has the form:

text
nodematch:<attribute>

The dyadic feature is:

xij,nodematch:attr={1,if ai=aj and both values are non-missing0,otherwise

GOF-style statistics ​

The approximate GOF workflow compares observed and simulated networks using:

  • edges;
  • density;
  • average degree;
  • triangle count;
  • degree distribution;
  • edge-wise shared partners;
  • geodesic distance distribution with NR for unreachable pairs.