Tutorials › Econometrics (Graduate) › Contextual, Endogenous, and Correlated Effects

Spatial and Network Econometrics · Tutorial 946 of 952

Contextual, Endogenous, and Correlated Effects

Learn how to distinguish contextual effects, endogenous peer effects, and correlated group shocks, and what observable variation is needed to separate them.

Advanced 12 min read

What You'll Learn

  • Distinguish effects of peers’ characteristics from feedback through peers’ outcomes.
  • Represent shared group shocks separately from observed peer exposures.
  • Use within-group variation to remove shocks common to every member of a group.
  • Check whether contextual exposure varies independently of own characteristics and group effects.
  • Explain why endogenous peer outcomes require additional exogenous variation for identification.

Three Different Sources of Similarity

People connected in a network may have similar outcomes for quite different reasons. A student’s outcome might respond to classmates’ characteristics, such as their prior preparation; it might respond to classmates’ realized outcomes; or classmates might share an unobserved shock, such as a change in school policy. These mechanisms are not interchangeable. A regression that treats them as one generic “peer effect” can attribute variation to the wrong source.

The distinction matters for both interpretation and identification. Observing that connected people have similar outcomes does not, by itself, show that one person’s outcome responds to another’s. The relevant question is which variation in observed characteristics, network exposures, and outcomes can distinguish the mechanisms, given a specified model.

Definition: A contextual effect is an effect of peers’ observed characteristics on an individual’s outcome. An endogenous peer effect is an effect of peers’ outcomes on that outcome. A correlated effect arises when connected individuals share unobserved determinants of their outcomes, such as a group-level shock. A correlated effect is not, by itself, a causal effect of one peer on another.

A Linear Network Model

Let \(i\) index individuals and \(g\) index groups. A group can be a classroom, a workplace, or a network component. Let \(y_{ig}\) be individual \(i\)’s outcome and \(x_{ig}\) an observed individual characteristic. Write \(W_g\) for the known network-weights matrix within group \(g\). Its \(i,j\) entry gives the weight individual \(i\) places on individual \(j\), with diagonal entries equal to zero. For simplicity, assume each row sums to one. Thus \((W_gx_g)_i\) is a weighted average of peers’ characteristics and \((W_gy_g)_i\) is a weighted average of peers’ outcomes.

Consider the structural equation

$$ y_{ig} = \alpha+\beta x_{ig} +\gamma(W_gx_g)_i +\rho(W_gy_g)_i +c_g+\varepsilon_{ig}. $$

Here \(c_g\) is a shock common to everyone in group \(g\), and \(\varepsilon_{ig}\) is an individual-specific disturbance. The parameter \(\beta\) describes the own-characteristic association, \(\gamma\) the contextual effect, and \(\rho\) the endogenous peer effect. These coefficients have outcome units per unit of the corresponding regressor. A causal interpretation requires appropriate exogeneity and identification conditions; the equation alone does not establish causality.

The model is simultaneous because an individual’s outcome appears in other individuals’ peer-outcome averages, while those outcomes in turn depend on their peers. Assume \(I-\rho W_g\) is invertible so the system has a unique reduced-form solution for given regressors and disturbances. This stability condition does not make \(W_gy_g\) exogenous.

Worked Example: Separating the Terms in One Structural Equation

Suppose a hypothetical three-person network has each person connected to the next, with the third connected back to the first. Thus person 1’s peer is person 2’s, person 2’s peer is person 3’s, and person 3’s peer is person 1’s. Let \(x=(2,4,1)\), \(y=(10,12,8)\), \(\alpha=3\), \(\beta=1\), \(\gamma=0.5\), \(\rho=0.2\), and \(c_g=2\). For illustration, treat these coefficients and the shock as known and calculate the individual disturbances implied by the equation.

The network exposures are \(W_gx=(4,1,2)\) and \(W_gy=(12,8,10)\). For person 1, the fitted structural component, excluding \(\varepsilon_{1g}\), is

$$ 3+1(2)+0.5(4)+0.2(12)+2=11.4. $$

Therefore \(\varepsilon_{1g}=10-11.4=-1.4\). For person 2, the fitted component is \(3+1(4)+0.5(1)+0.2(8)+2=11.1\), so \(\varepsilon_{2g}=12-11.1=0.9\). For person 3, it is \(3+1(1)+0.5(2)+0.2(10)+2=9\), so \(\varepsilon_{3g}=8-9=-1\).

The calculation labels the distinct contributions: own characteristics, peer characteristics, peer outcomes, and the common group shock. It does not estimate the coefficients or establish that any term is causal. In particular, the peer-outcome exposures are constructed from outcomes determined jointly in the network.

What Variation Can Separate the Components?

A group shock shared by every member creates a common component in outcomes. If groups have enough relevant variation, group fixed effects can absorb shocks that are constant within each group. Define within-group demeaning by subtracting a variable’s group average. Denote the resulting operator by \(M_g\); it removes any vector that is constant for all members of group \(g\). Applying it to the model gives

$$ M_gy_g = \beta M_gx_g +\gamma M_gW_gx_g +\rho M_gW_gy_g +M_g\varepsilon_g. $$

The intercept and \(c_g\) disappear because each is constant within the group. This is useful only if the remaining regressors contain enough distinct variation. For example, the contextual effect cannot be separated from the own-characteristic effect if \(M_gW_gx_g\) is an exact linear combination of \(M_gx_g\) and other included regressors. More generally, separate coefficients require the relevant regressor columns to have sufficient independent variation after the group effects and other controls are removed.

Demeaning does not solve the simultaneous-outcome problem: \(M_gW_gy_g\) still contains outcomes jointly determined in the network. Under suitable conditions, exogenous variation can help distinguish that term. For example, when \(x_g\) is exogenous and excluded from the structural equation except through \(x_g\) and \(W_gx_g\), a higher-order network exposure such as \(W_g^2x_g\) may provide an excluded instrument for \(W_gy_g\). It must actually predict the endogenous regressor, remain excluded from the outcome equation, and satisfy the required exogeneity conditions. If it is collinear with included regressors or unrelated to \(W_gy_g\), it cannot identify \(\rho\). The existence of a network matrix alone does not guarantee identification.

Identification takeaway: Group-level variation alone cannot separate a contextual effect from a group shock when the two move together. Within-group variation can remove a shock common to the group, but identifying \(\gamma\) still requires independent variation in peer characteristics after controls. Identifying \(\rho\) additionally requires valid variation that addresses the endogeneity of peer outcomes.

Worked Example: A Shared Shock Can Mimic a Contextual Effect

Consider two hypothetical groups, each containing two people who are each other’s only peer. Let the true outcome equation be \(y_{ig}=x_{ig}+c_g\): the own-characteristic coefficient is 1, the contextual-effect coefficient is 0, there is no peer-outcome term, and the group shock is \(c_g\). In group A, let the two \(x\) values be 1 and 2 and \(c_A=0\). In group B, let them be 5 and 6 and \(c_B=4\).

The outcomes are 1 and 2 in group A, and 9 and 10 in group B. Since each person’s peer is the other person, the peer-characteristic exposures are 2 and 1 in group A, and 6 and 5 in group B. The group averages are therefore:

$$ \bar y_A=1.5,\qquad \overline{Wx}_A=1.5; \qquad \bar y_B=9.5,\qquad \overline{Wx}_B=5.5. $$

Across the two groups, the difference in average outcome is \(9.5-1.5=8\), while the difference in average peer-characteristic exposure is \(5.5-1.5=4\). The ratio of these differences is \(8/4=2\), even though the true contextual coefficient is zero. The between-group outcome difference combines a difference in own-characteristic levels, which is 4, and a difference in shared shocks, which is also 4. The peer-characteristic averages also differ between groups, so their association with outcomes does not isolate a contextual effect.

Demeaning within each group removes the constant shock. But with two people who are each other’s only peer, \(Wx\) is exactly the other person’s \(x\). After demeaning, the peer-characteristic exposure is the negative of own \(x\)’s demeaned value. Thus own and peer characteristics are perfectly collinear in this example; group fixed effects remove the shock but do not create the independent variation needed to estimate \(\beta\) and \(\gamma\) separately.

Network Variation and the Contextual Effect

The network matters because it determines who contributes to each peer exposure. Even if the group’s set of observed characteristics stays fixed, a change in network weights can change \(W_gx_g\). Such variation can help identify a contextual effect if it is independent of the individual’s own characteristic, group effects, and other included regressors. Whether it is credible to treat network variation as exogenous depends on how the network arose; this tutorial’s model does not assume that any observed network is automatically exogenous.

Worked Example: Same Characteristics, Different Peer Exposures

Take four hypothetical individuals in one group with \(x=(0,1,3,4)\). In network A, individuals 1 and 2 are paired, and individuals 3 and 4 are paired. Each person places weight 1 on their partner. Then \(W_Ax=(1,0,4,3)\). In network B, individuals 1 and 3 are paired, and individuals 2 and 4 are paired, giving \(W_Bx=(3,4,0,1)\).

For individual 1, the own characteristic is 0 in both arrangements, and the group’s observed characteristics have not changed. Yet the peer-characteristic exposure changes from 1 to 3. The change is \(3-1=2\). In a model with a contextual effect \(\gamma\), that exposure change contributes \(2\gamma\) to the structural outcome component, holding the other terms fixed.

This comparison shows the kind of variation that can distinguish peer characteristics from own characteristics and a group-constant shock. It is not by itself an estimate of \(\gamma\): peer outcomes may also change, and network changes must be suitably independent of unobserved outcome determinants. To separate the contextual effect from the endogenous effect, the analysis also needs valid variation or restrictions that identify the peer-outcome term.

Assumptions and Interpretation

A useful analysis states which features of the model are treated as known or exogenous, rather than inferring them from a pattern of similarity. The following conditions clarify what the variation can and cannot establish:

  • Network definition: \(W_g\) represents the relevant peer links and weights. Changing the weights changes the meaning of the peer exposures.
  • Common-shock structure: \(c_g\) is constant within group \(g\). Group fixed effects do not eliminate shocks that vary across individuals in the group.
  • Contextual variation: after removing group effects and other controls, peer-characteristic exposure must not be perfectly explained by own characteristics and those controls.
  • Peer-outcome identification: \(W_gy_g\) is generally endogenous in the simultaneous model. Estimating its coefficient needs valid identifying variation and the required model conditions.
  • Causal interpretation: even a numerically identified coefficient is causal only under assumptions that rule out relevant confounding and justify the source of identifying variation.

The coefficient \(\gamma\) is the structural change in the outcome associated with a one-unit change in weighted peer characteristics, holding the other terms in the equation fixed. The coefficient \(\rho\) is the corresponding structural response to a one-unit change in weighted peer outcomes. Neither coefficient should be described as the total effect of an initial change in one person’s characteristic: in a network with feedback, the change can propagate, and its total effect depends on the full system.

Common Mistakes

  • Calling every similarity a peer effect. Similar outcomes can result from a shared shock. Distinguish a modeled response to peers’ characteristics or outcomes from common unobservables.
  • Treating peer characteristics and peer outcomes as the same regressor. \(W_gx_g\) uses observed characteristics; \(W_gy_g\) uses jointly determined outcomes. They have different meanings and different identification problems.
  • Assuming group fixed effects identify every peer coefficient. They remove group-constant components, but cannot resolve exact collinearity or make endogenous peer outcomes exogenous.
  • Interpreting an association as a causal spillover. A peer exposure that moves with group shocks or unobserved determinants does not, without further assumptions, identify a causal effect.
Key takeaway: Contextual effects, endogenous peer effects, and correlated effects are distinct mechanisms. Separate them by specifying the structural equation and asking what independent variation remains after accounting for group shocks, own characteristics, and the endogeneity of peer outcomes.

Check Your Understanding

Use the model and identification logic developed above to answer these questions.

  1. In the structural equation, which term represents a response to peers’ observed characteristics, and which represents a response to peers’ outcomes?
  2. What kind of shock is removed by group fixed effects, and what kind of unobserved variation might remain?
  3. Why can between-group differences in average outcomes and average peer characteristics fail to identify a contextual effect?
  4. What condition on the within-group regressors is needed to distinguish the contextual coefficient from the own-characteristic coefficient?
  5. Why does demeaning the data not, by itself, make the peer-outcome exposure exogenous?
  6. Give one reason a proposed higher-order network exposure might fail to identify the endogenous peer-effect coefficient.
Clinical Biostats