Day 11: Advanced ERGMs and Temporal ERGMs

Specification, network change, and what the model can claim

Shahryar Minhas

The Refresher We Need

Olga has already covered:

  • Why a random-graph baseline matters
  • The ERGM probability model and change statistics
  • edges, nodematch, mutual, triangle, and gwesp
  • MCMC estimation, diagnostics, and goodness of fit
  • Mesa and rebel-cooperation applications

We will not repeat the full introduction, but we will recover the pieces needed to understand today’s questions.

What Is an ERGM Meant to Answer?

After accounting for the other declared features of the graph, which tie configurations make one possible network more plausible than another?

The model does not stop at:

  • Are there triangles?
  • Are there reciprocal ties?
  • Are similar actors connected?

It asks whether those patterns are more common than the rest of the specification predicts.

The outcome is the whole graph. We usually interpret it through the conditional comparison created by toggling one eligible tie.

How Is This Different From What We Just Did?

Latent Models

Represent residual dependence through sender, receiver, distance, or multiplicative latent structure.

Useful when the goal is adjustment, representation, or prediction.

ERGM

Represents declared configurations directly in the probability distribution of the graph.

Useful when reciprocity, closure, popularity, or another network feature is itself part of the question.

AME can absorb clustering without naming it. An ERGM can estimate a shared-partner term, but that coefficient still does not prove the behavioral mechanism.

How Is an ERGM Estimated?

  1. Start with provisional coefficients.
  2. Simulate whole networks using MCMC tie toggles.
  3. Calculate the statistics in every simulated network.
  4. Compare their averages with the observed graph statistics.
  5. Update the coefficients and repeat.

\[E_{\hat\theta}[g(Y)]\approx g(y_{obs})\]

The fitted model should make the observed sufficient statistics look typical among networks it generates.

What MCMLE Is Maximizing

\[ \ell(\theta;y_{\mathrm{obs}}) =\theta^{\mathsf T}g(y_{\mathrm{obs}}) -\log\kappa(\theta) \]

The first term rewards parameters that favor the observed statistics. The normalizing term compares that fit with every graph the model permits.

\[ \nabla\ell(\theta) =g(y_{\mathrm{obs}})-E_{\theta}[g(Y)] \]

Matching simulated and observed statistics is the maximum-likelihood score condition. MCMC makes that comparison computationally possible.

Why the Extra Machinery Is Worth It

Social relationships can be self-organizing:

  • Alliances are shaped by existing partners and threats.
  • Legislative coalitions expand through common collaborators.
  • Organizations attract ties partly because they are already prominent.
  • Segregation can emerge from many local relational choices.

Dependence may be part of the process we want to understand, not merely a nuisance in the standard errors.

ERGMs let us put those competing processes into one declared graph model and ask which stories remain compatible with the data.

The Models Answer Different Applied Questions

Model Main question What we should be able to say
ERGM Which configurations make this graph more plausible? Closure is positive conditional on the other represented graph features
Valued ERGM What explains tie existence and tie magnitude? Existing ties have greater volume than the reference process predicts
TERGM How does the preceding network relate to the next one? Receiving a tie predicts returning it in the next interval
STERGM Do formation and persistence have different explanations? Threat predicts alliance formation, while institutions predict survival

Where We Are Going

  1. Decide what process a structural term can actually represent.
  2. Put fitted results into units tied to the observed action.
  3. Separate data, estimation, degeneracy, and fit problems.
  4. Define the outcome and risk set in a network panel.
  5. Distinguish stability, formation, persistence, and sequence.
  6. Decide what a TERGM can claim and where a SAOM asks a different question.

A Triangle Is Not Yet a Mechanism

Triangles in an alliance, cosponsorship, or rebel-cooperation network could reflect:

  • Partners introducing partners
  • Shared ideology, geography, or threat
  • Highly active actors creating triangles mechanically
  • A genuinely self-reinforcing closure process

Does apparent closure survive after we represent the rival processes our theory says are plausible?

Two Nulls Tell Two Different Stories

Density Baseline

What would the network look like if eligible ties occurred at the observed overall rate?

Degree-Constrained Baseline

What would the network look like if actors kept their observed activity and popularity but partners were rearranged?

In the Mesa friendship network, observed transitivity is about 27 times the Erdős-Rényi expectation and about 12 times the degree-preserving expectation. Preserving each student’s number of friends explains part of the clustering, but not all of it.

Put Effects on the Friendship Scale

For a proposed tie toggle, move through four steps:

  1. Calculate the change statistics.
  2. Construct the conditional log-odds.
  3. Convert them to a probability.
  4. Average or contrast over configurations that matter for the application.

Fewer than 1 in 100 possible student pairs are friends in Mesa. Same-grade status raises the fitted friendship probability by about 2.8 percentage points, roughly three times the 0.97 percent baseline density.

Coefficients Can Move When the Scale Moves

Adding a dependence term can change:

  • The process represented by the model
  • Every dyad’s conditional predictor
  • The residual variation left for other terms
  • The log-odds scale on which coefficients are reported

Do not treat a coefficient difference across nested ERGMs as the amount of omitted-variable bias that was removed.

Compare stated configurations using probabilities, first differences, and simulations.

Diagnose Four Different Problems

Problem Question to Ask
Data support Are categories, mixing cells, or transition types empty?
Estimation Did the MCMC sample mix and reach the target statistics?
Degeneracy Does the model put mass on nearly empty or complete graphs?
Substantive fit Do simulated graphs reproduce features the argument needs?

A fix for one row does not repair the other three.

Fixed = TRUE Changes the Model

gwesp(0.25, fixed = TRUE) estimates one coefficient with decay held at 0.25.

gwesp(0.25, fixed = FALSE) treats 0.25 as a starting value and estimates the decay as an additional parameter.

Does the network contain enough information to identify both the strength and shape of shared-partner dependence?

Simulation Is a Critic, Not a Victory Lap

After fitting, ask simulated networks to reproduce:

  • Degree and centralization
  • Reciprocity and mixing
  • Shared partners and distances
  • The particular structure needed for the substantive claim

What observed feature would make us withdraw the conclusion if the fitted model consistently missed it?

ERGMs and Latent Models Can Fit the Same Pattern Differently

Latent Factor or AME

Absorbs residual dependence through unobserved actor positions or multiplicative effects.

ERGM

Represents declared network configurations directly in the joint graph distribution.

Similar fit does not imply the same explanation. Neither model identifies closure versus unobserved homophily from one cross-section.

A Cross-Section Cannot Recover Sequence

Suppose an alliance exists in 2010.

The snapshot cannot tell us whether it:

  • Formed during the preceding interval
  • Survived from an earlier period
  • Dissolved and re-formed between observations
  • Was impossible to observe for part of the interval

Sequence has to be present in the data and represented in the model. It cannot be recovered from a photograph.

A TERGM Models Network Transitions

\[\Pr(Y^2,\ldots,Y^T\mid Y^1)=\prod_{t=2}^{T}\Pr(Y^t\mid Y^{t-1})\]

The statistics may reference:

  • Configurations in the current graph
  • Dyad states in the preceding graph
  • Relationships between current and lagged configurations

The coefficient is a conditional association under a transition distribution. It is not automatically a causal effect of an actor’s choice.

Audit the Temporal Risk Set First

Before writing the formula, verify:

  1. Which actors exist and are eligible in every interval?
  2. Is each dyad an observed zero, missing, or structurally impossible?
  3. Are actor labels and tie direction aligned across waves?
  4. Which version of a time-varying covariate predicts each transition?
  5. Are the observation intervals substantively comparable?
  6. How many transitions do the waves actually provide?

Three Terms Ask Three Sequence Questions

Term Question
Stability Does the dyad remain in its preceding state?
Delayed reciprocity Does receiving a tie at \(t-1\) predict returning it at \(t\)?
Lagged two-path closure Does a two-path at \(t-1\) predict its closure at \(t\)?

Current-wave mutual and gwesp describe dependence within \(Y^t\). They are not substitutes for lagged sequence terms.

Stability Favors Keeping the Previous Dyadic State

Compare two otherwise similar student pairs, one previously friends and one previously not.

Previously Friends

If they are friends now, the pair remains in the same state.

Current-friendship contribution: \(+\theta\)

Previously Not Friends

If they are friends now, the pair changes from its previous state.

Current-friendship contribution: \(-\theta\)

\[\text{Difference in current-friendship log-odds}=\theta-(-\theta)=2\theta\]

The corresponding odds ratio is \(\exp(2\theta)\).

A positive \(\theta\) makes existing friendships more likely to remain and previously absent friendships less likely to form. Stability captures resistance to both kinds of change, not only friendship survival.

The Past Can Change the Structural Story

We fit the same two outcome waves twice:

  1. Current network terms and covariates only
  2. The same specification plus lagged dyad stability

Before either fit, netify validates the three friendship matrices and to_statnet() creates the aligned network list required by btergm.

If reciprocity or closure changes after memory enters, the cross-sectional story was entangled with persistence.

But the coefficient movement is not a clean bias estimate. Compare recognizable configurations on a probability scale and examine simulated transitions.

Three Waves Give Us Two Transitions

\[T\text{ waves}=T-1\text{ transitions}\]

The first wave conditions the first transition. It is not another transition outcome.

Can resampling two transitions tell us how a change process varies over time?

This dataset is useful for learning the workflow. It is not a foundation for publication-grade temporal uncertainty.

Estimation Strategy Is Part of the Claim

Approach Core Idea
btergm() MPLE with bootstrap uncertainty over temporal observations
mtergm() MCMC maximum likelihood using a constrained block-diagonal representation
Statnet tergm() Conditional maximum likelihood for a network series

Choose based on the estimand, dependence structure, number of waves, network size, and diagnostics.

We use btergm() for a fast worked example, not because one estimator is universally best.

What btergm() Fits in This Example

\[ \widetilde\ell(\theta) =\sum_{t=2}^{T}\sum_{i\ne j} \left[ y_{ijt}\log\widetilde p_{ijt} +(1-y_{ijt})\log(1-\widetilde p_{ijt}) \right] \]

  • The point estimate maximizes a pooled conditional tie pseudolikelihood.
  • Lagged terms carry information from the preceding network into each transition.
  • Current-wave dependence terms condition on the other current dyads.
  • The bootstrap resamples observed transitions and refits the same objective.

This is not the full transition likelihood. With only two transitions, the bootstrap cannot create the missing temporal replication.

Formation and Persistence Need Different Risk Sets

Formation

At risk: dyads without a tie at \(t-1\)

Which eligible pairs form a tie by \(t\)?

Persistence

At risk: dyads with a tie at \(t-1\)

Which existing ties survive through \(t\)?

Common threats may help alliances form. Institutions may help established alliances endure. One equation need not describe both processes.

Temporal Fit Must Be Temporal

Simulate one step ahead and check:

  • Formed, persistent, and dissolved ties
  • Next-wave degree, reciprocity, mixing, and shared partners
  • Delayed reciprocity and lagged closure
  • Calibration of transition probabilities
  • Held-out later waves when the panel is long enough

In a sparse network, predicting “no tie” everywhere can look accurate. Classification accuracy alone is not a useful validation strategy.

A Temporal Coefficient Is Not Automatically Causal

A lagged term establishes ordering in the model, but causal interpretation still requires:

  • Defensible timing and measurement
  • Adequate controls for common causes
  • A credible risk set
  • No consequential unobserved change between waves
  • An identification argument beyond model fit

“Associated with subsequent tie formation” is often accurate. “Causes actors to form ties” usually requires more.

TERGM and SAOM Encode Different Change Stories

TERGM

Specifies the distribution of a network transition, conditional on the preceding network.

SAOM

Represents actors receiving opportunities to make small tie changes between panel waves.

Both use longitudinal networks. They place the process at different levels and rely on different assumptions.

After the Model Runs

  1. Name the outcome, transition, and eligible dyads.
  2. Translate terms into before-and-after configurations involving the observed actors and ties.
  3. Report probabilities or first differences for recognizable cases.
  4. Simulate the structures and changes the argument needs.
  5. State what the model does not identify.

“Among these 50 adolescents, pairs that were in the same tie state at the preceding wave receive greater conditional weight to remain in that state at the next wave. The memory estimate is large, but the panel supplies only two transitions, so this is a worked demonstration rather than a stable population estimate.”

What to Carry Into Day 12

  1. A structural statistic has an exact mathematical definition but not an automatic substantive mechanism.
  2. Comparisons tied to actors and actions are more useful than an isolated log-odds coefficient.
  3. Data support, estimation, degeneracy, and substantive fit are different problems.
  4. Temporal models require an explicit risk set, lag structure, and transition estimand.
  5. Formation, persistence, and actor-oriented change are related but distinct questions.

The model becomes useful when the substantive story, the risk set, the statistic, and the interpretation all describe the same process.