Tutorials › Econometrics (Graduate) › Staggered Adoption and Two-Way Fixed Effects Weights

Difference-in-Differences and Events · Tutorial 666 of 952

Staggered Adoption and Two-Way Fixed Effects Weights

Learn how staggered-adoption two-way fixed effects combine cohort-time treatment effects, and why negative weights matter when those effects vary.

Advanced 10 min read

What You'll Learn

  • Define cohorts and cohort-time average treatment effects under staggered adoption.
  • Derive the two-way fixed-effects coefficient using residualized treatment.
  • Calculate cohort-time weights in a balanced panel.
  • Explain why the weights sum to one but need not be nonnegative.
  • Diagnose how treatment-effect heterogeneity can make the coefficient misleading.
  • Distinguish a valid weighted sum from a convex average of causal effects.

Why the Two-Way Fixed-Effects Coefficient Needs Careful Interpretation

When units adopt a policy at different times, a regression with unit and time fixed effects is a compact way to summarize outcome changes. But its treatment coefficient does not generally average the effects for treated units in an obvious way. The regression can give different cohort-time effects different weights, and some of those weights can be negative.

The issue is not that two-way fixed effects are automatically unusable. If treatment effects are constant, the coefficient can recover that common effect under appropriate conditions. The difficulty arises when effects vary across adoption cohorts or over time: then the coefficient may not be a convex average, and its sign or magnitude may not describe a typical treated unit.

Definition: A cohort is the group of units that first receives treatment in the same period. Write \(G_i=g\) if unit \(i\) first receives treatment in period \(g\), and \(G_i=\infty\) for a never-treated unit. For a treated cohort \(g\) and period \(t\geq g\), the cohort-time average treatment effect is $$ \tau_{gt}=E\!\left[Y_{it}(1)-Y_{it}(0)\mid G_i=g\right], $$ where \(Y_{it}(1)\) and \(Y_{it}(0)\) denote unit \(i\)'s outcomes with and without treatment in period \(t\).

Assume treatment is absorbing: a unit remains treated after its adoption date. Also assume no anticipation, so treatment does not affect outcomes before adoption. These assumptions make the treatment indicator \(D_{it}=1(t\geq G_i)\) for adopting units and zero for never-treated units. The parameter \(\tau_{gt}\) can vary across cohorts and periods; allowing that variation is central to understanding the weights.

The Fixed-Effects Coefficient as a Weighted Sum

Consider a balanced panel observed in periods \(t=1,\ldots,T\), with one observation per unit-period and an equally weighted least-squares regression of the outcome on unit fixed effects, time fixed effects, and \(D_{it}\). The coefficient on treatment is denoted \(\hat\beta_{\mathrm{TWFE}}\). For any variable \(V_{it}\), let \(\widetilde V_{it}\) denote the residual after projecting it on the unit and time fixed effects. The Frisch–Waugh–Lovell result says that the treatment coefficient is the regression of the residualized outcome on residualized treatment.

$$ \hat\beta_{\mathrm{TWFE}} = \frac{\sum_i\sum_t \widetilde D_{it}Y_{it}} {\sum_i\sum_t \widetilde D_{it}^{\,2}}. $$

In a balanced panel, residualizing treatment on both sets of fixed effects has a simple form. Let \(\bar D_i\) be unit \(i\)'s average treatment indicator across periods, \(\bar D_t\) the average across units in period \(t\), and \(\bar D\) the overall average. Then \(\widetilde D_{it}=D_{it}-\bar D_i-\bar D_t+\bar D\).

To interpret the coefficient causally, write the observed outcome as \(Y_{it}=Y_{it}(0)+D_{it}\{Y_{it}(1)-Y_{it}(0)\}\). Suppose the untreated outcomes are captured by unit and time fixed effects, or that the remaining untreated-outcome component is orthogonal to residualized treatment in expectation. This is a sufficient parallel-trends condition for the regression decomposition below. If the condition fails, the coefficient also contains an untreated-outcome component and is not just a weighted sum of treatment effects.

Result: Under the stated untreated-outcome condition, the TWFE coefficient can be written as $$ \hat\beta_{\mathrm{TWFE}}=\sum_g\sum_{t\geq g}w_{gt}\tau_{gt}, \qquad w_{gt}=\frac{n_g\widetilde D_{gt}}{Q}, \qquad Q=\sum_i\sum_t\widetilde D_{it}^{\,2}. $$ Here \(n_g\) is the number of units in cohort \(g\), and \(\widetilde D_{gt}\) is the common residualized treatment value for units in cohort \(g\) in period \(t\). The equality is exact when untreated outcomes are fully absorbed by the fixed effects; under an orthogonality condition it holds for the corresponding expectation or population coefficient.

The weights sum to one when the regression contains treatment variation not fully absorbed by the fixed effects. To see this, sum the numerator of the weights over treated observations. Since \(D_{it}\) is zero or one, \(D_{it}\widetilde D_{it}=0\) for untreated observations and equals \(\widetilde D_{it}\) for treated observations. Also, the residual from projecting \(D\) on the fixed effects is orthogonal to its fitted values, so \(\sum_{it}D_{it}\widetilde D_{it}=\sum_{it}\widetilde D_{it}^{\,2}=Q\). Thus \(\sum_{g,t\geq g}w_{gt}=1\).

That normalization does not make the weights probability weights. Because \(\widetilde D_{gt}\) can be negative for a treated cohort-time cell, \(w_{gt}\) can be negative. Consequently, the coefficient need not lie between the smallest and largest cohort-time effects.

Worked Example: A Simple Staggered Panel

Suppose three equally sized cohorts are observed in three periods: cohort A adopts in period 2, cohort B adopts in period 3, and cohort C is never treated. The treatment-indicator rows are \((0,1,1)\), \((0,0,1)\), and \((0,0,0)\). Calculate the nonzero treated-cell weights and the coefficient if \(\tau_{A2}=2\) outcome points, \(\tau_{B3}=6\) points, and \(\tau_{A3}=10\) points.

The unit means of treatment are \(2/3, 1/3, 0\); the period means are \(0,1/3,2/3\); and the overall mean is \(1/3\). Applying \(\widetilde D_{it}=D_{it}-\bar D_i-\bar D_t+\bar D\), the residualized treatment rows are:

$$ \begin{array}{c|ccc} & t=1&t=2&t=3\\ \hline A&-1/3&1/3&0\\ B&0&-1/3&1/3\\ C&1/3&0&-1/3 \end{array} $$

The denominator is the sum of the squared entries, \(Q=6(1/9)=2/3\), per one unit in each cohort. Therefore the weight on \((A,2)\) is \((1/3)/(2/3)=1/2\), the weight on \((A,3)\) is zero, and the weight on \((B,3)\) is also \(1/2\). The coefficient is

$$ \hat\beta_{\mathrm{TWFE}} =\frac12(2)+0(10)+\frac12(6)=4\text{ outcome points}. $$

The result is not the simple average of all three effects: the period-3 effect for cohort A receives zero weight in this design. A zero weight is distinct from a negative weight, but it already shows why the coefficient's target should be established rather than assumed.

How Negative Weights Arise

For a balanced panel, define \(p_g\) as the fraction of periods for which cohort \(g\) is treated, \(p_t\) as the treated share in period \(t\), and \(p\) as the overall treated share. The residualized treatment for a member of cohort \(g\) is

$$ \widetilde D_{gt}=D_{gt}-p_g-p_t+p. $$

A treated observation has \(D_{gt}=1\), but its residual can still be negative if its unit's average treatment exposure and the period's treated share are sufficiently large relative to the overall exposure. This can occur for an early-adopting cohort in late periods, after many units have adopted. Residualization compares each observation with both its unit average and the period average; it does not leave every treated observation with a positive residual.

Worked Example: Negative Weights and a Sign-Reversed Coefficient

Consider six periods and three equally sized cohorts: A adopts in period 2, B in period 4, and C is never treated. Each cohort contains \(m\) units. For clarity, the treatment rows are A: \((0,1,1,1,1,1)\), B: \((0,0,0,1,1,1)\), and C: \((0,0,0,0,0,0)\). The unit means are \(5/6,1/2,0\); the period means are \(0,1/3,1/3,2/3,2/3,2/3\); and the overall mean is \(4/9\).

For cohort A, the residualized treatment is \(5/18\) in periods 2 and 3, then \(-1/18\) in periods 4, 5, and 6. For cohort B, it is \(5/18\) in each treated period, 4 through 6. The sum of squared residuals across all units and periods is \(Q=11m/9\). Thus the weights on A's first two treated cells are each \((5m/18)/(11m/9)=5/22\); its three later treated cells each receive \((-m/18)/(11m/9)=-1/22\); and each of B's treated cells receives \(5/22\). The weights add to

$$ 2\left(\frac{5}{22}\right)+3\left(-\frac{1}{22}\right) +3\left(\frac{5}{22}\right)=1. $$

Now suppose cohort A's effects are 2 points in periods 2 and 3 and 20 points in periods 4 through 6, while cohort B's effects are 1 point in each treated period. Every effect is positive. Nevertheless, the regression coefficient is

$$ \hat\beta_{\mathrm{TWFE}} =2\left(\frac{5}{22}\right)(2) +3\left(-\frac{1}{22}\right)(20) +3\left(\frac{5}{22}\right)(1) =\frac{20-60+15}{22} =-\frac{25}{22} \approx -1.136\text{ points}. $$

The negative estimate does not mean that treatment harmed every cohort-time cell: all the specified effects are positive. Instead, the large late effects for cohort A receive negative weights and pull the regression coefficient below zero. The calculation illustrates why a TWFE coefficient with heterogeneous effects should not automatically be described as an average effect for treated units.

When the Coefficient Does Have a Simple Meaning

A useful benchmark is a common treatment effect: \(\tau_{gt}=\tau\) for every treated cohort-time cell. Since the weights sum to one, the weighted sum is then \(\tau\), even if some individual weights are negative. Heterogeneity is what makes the particular pattern of weights consequential for the coefficient's interpretation. This observation does not rescue a regression when untreated trends are not adequately controlled; the identifying condition on untreated outcomes is still needed.

Worked Example: A Common Effect Despite Negative Weights

Use the six-period design above, but suppose every treated cohort-time effect is 4 outcome points. The weights for cohort A sum to \(2(5/22)+3(-1/22)=7/22\). The weights for cohort B sum to \(3(5/22)=15/22\). Across all treated cells they sum to \(22/22=1\), so

$$ \hat\beta_{\mathrm{TWFE}} =\frac{7}{22}(4)+\frac{15}{22}(4) =\left(\frac{7+15}{22}\right)4 =4\text{ outcome points}. $$

Thus negative weights alone do not force a misleading coefficient. They become especially problematic when effects differ across cohorts or periods, because those effects are then combined according to a signed weighting scheme rather than an ordinary average.

Assumptions, Scope, and a Common Pitfall

The weight formula is an algebraic property of the specified regression and sample. Its causal interpretation requires additional conditions. Treatment must be defined consistently as an absorbing intervention; there must be no anticipation; and untreated outcomes must satisfy a suitable parallel-trends condition so that residualized treatment is not systematically related to untreated outcome changes. The examples use a balanced panel and equal observation weights. With an unbalanced panel, sampling weights, or a different regression specification, the residualization and resulting weights can differ.

Common mistake: “The TWFE coefficient is a weighted average, and the weights sum to one, so it must lie between the smallest and largest treatment effects.” The conclusion does not follow: weights that sum to one can be negative. The correction is to inspect the signs and sizes of the cohort-time weights before treating the coefficient as a convex average. If effects are heterogeneous, report the target and weighting scheme clearly, and consider methods that estimate or aggregate cohort-time effects directly.

This perspective also helps distinguish the overall treatment coefficient from event-time coefficients. Each is tied to its own regression and weighting structure; one should not infer the interpretation of one specification from another. In particular, the TWFE coefficient alone does not reveal which cohort-time effects receive positive, zero, or negative influence.

Key takeaway: In a balanced staggered-adoption panel, the TWFE treatment coefficient can be expressed as a weighted sum of cohort-time effects, with weights proportional to cohort size times residualized treatment. The weights sum to one but may be negative. Common effects are recovered under the identifying assumptions; heterogeneous effects require careful interpretation of the weights.

Check Your Understanding

Use the definitions and weight formula above to answer these questions.

  1. What does \(\tau_{gt}\) measure, and which units are included in cohort \(g\)?
  2. Why do the cohort-time weights sum to one, and why does that fact not guarantee a convex average?
  3. In the six-period example, what is the weight on each of cohort A's effects in periods 4 through 6? Explain how the sign follows from residualized treatment.
  4. If every cohort-time effect equals the same constant, what does the weighted-sum representation imply for the TWFE coefficient, assuming the untreated-outcome condition holds?
  5. What additional concern arises if untreated outcomes are not adequately captured by unit and time fixed effects?
Clinical Biostats