Tutorials › Causal Inference › Negative Weights and Sign Reversals in TWFE

Staggered Adoption and Event Studies · Tutorial 612 of 972

Negative Weights and Sign Reversals in TWFE

Learn how to derive TWFE cohort-time weights, identify negative weights, and distinguish a sign-reversed weighted effect from the realized estimate.

Advanced 12 min read

What You'll Learn

  • Derive cohort-time weights for a balanced staggered-adoption TWFE regression.
  • Explain why the weights sum to one but need not be nonnegative.
  • Calculate how heterogeneous effects can put a TWFE estimand outside the range of cohort-time effects.
  • Identify a sign reversal in a hypothetical staggered-adoption example.
  • Distinguish the expected weighted-effect decomposition from the realized regression coefficient.

Why Negative Weights Matter

A two-way fixed-effects (TWFE) regression is often summarized as estimating an average treatment effect. Under staggered adoption, that description can be misleading: when effects vary across adoption cohorts or over time, the coefficient can combine cohort-time effects with weights that are negative. The resulting coefficient may lie outside the range of those effects, and it can even have the opposite sign.

The issue is not that a negative weight is itself a negative treatment effect. It is that a weighted average with negative weights is not necessarily an average in the usual sense of lying between the smallest and largest values. To see precisely when this can happen, consider a balanced panel in which units belong to adoption cohorts, treatment begins at each cohort's adoption date, and treatment remains in place thereafter.

Definition: Let \(D_{it}\) equal 1 when unit \(i\) is treated in period \(t\), and 0 otherwise. Let \(\widetilde D_{it}\) be the residual from projecting \(D_{it}\) on unit and time fixed effects. For adoption cohort \(g\) and period \(t\), let \(\tau_{gt}\) be the average treatment effect for cohort \(g\) in period \(t\), when \(t\) is on or after adoption. The cohort-time weight \(\omega_{gt}\) is the coefficient assigned to \(\tau_{gt}\) in the expected TWFE decomposition.

The Weight Decomposition

For clarity, suppose the untreated outcome follows an additive unit-and-time model, with a remaining disturbance: \(Y_{it}(0)=\alpha_i+\lambda_t+\varepsilon_{it}\). For treated observations, write the observed outcome as \(Y_{it}=Y_{it}(0)+\tau_{it}\); for untreated observations, \(Y_{it}=Y_{it}(0)\). Assume the treatment design is fixed and the disturbance satisfies \(E[\sum_{i,t}\widetilde D_{it}\varepsilon_{it}\mid D]=0\). This conditional mean-zero condition is what allows an expected-effect decomposition. It does not require the disturbance's realized contribution to be zero.

The TWFE coefficient is the OLS coefficient on \(D_{it}\) in a regression that also includes unit and time fixed effects. By the Frisch–Waugh–Lovell theorem, it can be computed by regressing the outcome residualized on those fixed effects on \(\widetilde D_{it}\). Because the residualized treatment is orthogonal to the fixed effects, this gives the following exact expression for the realized coefficient:

$$ \widehat\beta_{\mathrm{TWFE}} = \frac{\sum_{i,t}\widetilde D_{it}Y_{it}}{\sum_{i,t}\widetilde D_{it}^{\,2}} = \frac{\sum_{i,t:D_{it}=1}\widetilde D_{it}\tau_{it}}{\sum_{i,t}\widetilde D_{it}^{\,2}} + \frac{\sum_{i,t}\widetilde D_{it}\varepsilon_{it}}{\sum_{i,t}\widetilde D_{it}^{\,2}}. $$

The first term is the treatment-effect contribution; the second is the realized disturbance contribution. In a balanced panel, the residualized treatment is constant within each cohort-time cell. Thus the first term can be written using the cohort-time average effect, with cell size \(n_g\). Taking the conditional expectation given the treatment design removes the disturbance contribution under the stated mean-zero condition:

$$ E[\widehat\beta_{\mathrm{TWFE}}\mid D] = \sum_g\sum_{t\geq g}\omega_{gt}\tau_{gt}, \qquad \omega_{gt} = \frac{n_g\widetilde D_{gt}}{\sum_{i,t}\widetilde D_{it}^{\,2}}. $$

Here \(\widetilde D_{gt}\) is the residualized treatment for a unit in cohort \(g\) at time \(t\). The denominator sums squared residualized treatment over all units and periods, including untreated observations. For the decomposition to be defined, that denominator must be positive: treatment cannot be perfectly explained by the unit and time fixed effects.

Key result: The cohort-time weights sum to one, but they need not all be nonnegative. Therefore the expected TWFE coefficient is a convex average of cohort-time effects only when every included weight is nonnegative. If some weights are negative, the coefficient can fall outside the range of those effects.

Why the Weights Sum to One—and Can Be Negative

To verify the sum, use the fact that a residual is orthogonal to its fitted value. Since \(D_{it}\) is the sum of its fixed-effect projection and \(\widetilde D_{it}\), it follows that \(\sum_{i,t}D_{it}\widetilde D_{it}=\sum_{i,t}\widetilde D_{it}^{\,2}\). Because \(D_{it}\) is binary, the left side sums \(\widetilde D_{it}\) over treated observations only. Dividing both sides by the denominator in the weight definition proves that the weights sum to one.

$$ \sum_g\sum_{t\geq g}\omega_{gt} = \frac{\sum_{i,t:D_{it}=1}\widetilde D_{it}}{\sum_{i,t}\widetilde D_{it}^{\,2}} = \frac{\sum_{i,t}D_{it}\widetilde D_{it}}{\sum_{i,t}\widetilde D_{it}^{\,2}} =1. $$

The same argument does not establish that each weight is positive. A residualized treatment value measures how much treatment differs from what the unit and time fixed effects predict. For a treated cohort-time cell, that difference can be negative: the cell's treatment status is lower than the fixed-effects projection would predict. Since the denominator and cell size are positive, the cell's weight has the sign of \(\widetilde D_{gt}\).

A negative cell weight does not mean that the cell has a negative treatment effect. It means that its effect enters the TWFE combination with a negative multiplier. When effects differ, this subtraction can outweigh the positive-weight contributions.

Worked Example: Calculating Cohort-Time Weights

Consider a hypothetical balanced panel with three equally sized cohorts and four periods. The early cohort adopts in period 2, the late cohort in period 4, and the third cohort never adopts. For the calculation, take one representative unit per cohort; equal replication of every unit would leave the weights unchanged.

The treatment paths are early \((0,1,1,1)\), late \((0,0,0,1)\), and never-treated \((0,0,0,0)\). The grand mean of treatment is \(4/12=1/3\). The cohort means are \(3/4\), \(1/4\), and 0; the period means are \(0\), \(1/3\), \(1/3\), and \(2/3\). In a balanced panel, residualizing on unit and time effects gives the treatment value minus its cohort mean minus its period mean plus the grand mean.

For example, the early cohort's residualized treatment in period 4 is \(1-3/4-2/3+1/3=-1/12\). The complete residualized-treatment paths are:

  • Early: \((-5/12,\ 1/4,\ 1/4,\ -1/12)\).
  • Late: \((1/12,\ -1/4,\ -1/4,\ 5/12)\).
  • Never-treated: \((1/3,\ 0,\ 0,\ -1/3)\).

The denominator is the sum of the squares of all these values:

$$ \sum_{i,t}\widetilde D_{it}^{\,2} = \frac{44}{144}+\frac{44}{144}+\frac{32}{144} = \frac{5}{6}. $$

Only four cohort-time cells are treated. Their weights are early-period 2: \((1/4)/(5/6)=3/10\); early-period 3: \(3/10\); early-period 4: \((-1/12)/(5/6)=-1/10\); and late-period 4: \((5/12)/(5/6)=1/2\). They sum to \(3/10+3/10-1/10+1/2=1\), and the early cohort's period-4 weight is negative.

Heterogeneity Can Put the Estimate Outside the Range

If every cohort-time effect equals the same constant \(\tau\), the weighted treatment-effect contribution is \(\tau\), because the weights sum to one. Negative weights alone do not force a discrepancy under homogeneous effects. The problem arises when effects differ: a negative weight can subtract a large effect while positive weights contribute smaller effects.

Worked Example: A Sign Reversal With Positive Effects

Use the hypothetical panel and weights just calculated. Suppose the early cohort's effects are 1 outcome unit in periods 2 and 3, and 20 outcome units in period 4. Suppose the late cohort's period-4 effect is 1 outcome unit. Every cohort-time effect is positive, and the smallest is 1 outcome unit.

The expected TWFE coefficient, conditional on the treatment design and under the mean-zero disturbance condition, is:

$$ E[\widehat\beta_{\mathrm{TWFE}}\mid D] = \left(\frac{3}{10}\right)(1) +\left(\frac{3}{10}\right)(1) -\left(\frac{1}{10}\right)(20) +\left(\frac{1}{2}\right)(1) = -0.9000. $$

The coefficient's treatment-effect component is \(-0.9000\) outcome units, even though every cohort-time effect is positive and ranges from 1 to 20 outcome units. It is below the minimum effect, and its sign is reversed. This does not show that any cohort benefits from treatment in a negative direction; it shows that the signed weighting scheme produces a negative combination.

A different assignment of effects to the same weights can produce an estimate outside the range without reversing its sign. For example, if the effects for the early cohort in periods 2, 3, and 4 are all 2 outcome units, and the late cohort's period-4 effect is 5 outcome units, the weighted result is:

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

The effects range from 2 to 5 outcome units, so this result is within their range. That comparison highlights an important distinction: negative weights make an outside-the-range estimate possible, not inevitable. The effect values and their alignment with positive and negative weights determine the result.

The Expected Decomposition Is Not the Realized Coefficient

A frequent error is to write the weighted-effects expression as an exact equality for the observed regression coefficient merely because the untreated outcome is modeled using fixed effects. Residualizing removes the unit and time fixed effects from the regression calculation, but it does not generally remove the disturbance. The exact realized coefficient still includes \(\sum_{i,t}\widetilde D_{it}\varepsilon_{it}/\sum_{i,t}\widetilde D_{it}^{\,2}\). A zero conditional expectation for this term does not imply that its realized value is zero.

Worked Example: Keeping the Disturbance Term

Return to the sign-reversal example, whose treatment-effect contribution is \(-0.9000\) outcome units and whose denominator is \(5/6\). In a hypothetical realized sample, suppose one unit in the early cohort in period 2 has disturbance \(\varepsilon_{it}=0.8\) outcome units, while all other disturbances are zero. That cell has \(\widetilde D_{it}=1/4\), so the disturbance numerator is \((1/4)(0.8)=0.2\) squared-outcome units.

The realized coefficient is therefore:

$$ \widehat\beta_{\mathrm{TWFE}} = -0.9000+\frac{0.2}{5/6} = -0.9000+0.2400 = -0.6600 $$

The realized coefficient remains negative in this example, but it is not equal to the expected treatment-effect contribution. Other disturbance realizations could make it farther from that contribution or even change its sign. The conditional mean-zero assumption justifies the expected decomposition; it does not determine the disturbance in a particular sample.

Interpretation and Common Pitfalls

Negative weights matter because the TWFE coefficient may not answer the question suggested by a simple phrase such as “the average treatment effect.” Its interpretation depends on the design-induced weights and on how treatment effects vary across cohorts and periods. In particular, the coefficient need not summarize effects for a clearly defined target population using nonnegative shares.

  • Wrong: “The weights sum to one, so the coefficient must lie between the smallest and largest effects.” Correction: That range guarantee requires all weights to be nonnegative; weights summing to one is not enough.
  • Wrong: “A negative weight means the corresponding cohort has a negative treatment effect.” Correction: The weight and effect are different quantities. A negative weight describes how the regression combines that cell's effect, not the direction of the effect itself.
  • Wrong: “The weighted-effects formula is the exact realized regression coefficient whenever fixed effects are included.” Correction: It is an exact treatment-effect component plus a disturbance component; the weighted-effects expression alone describes the conditional expectation under the stated mean-zero condition.
  • Wrong: “Negative weights always cause sign reversal.” Correction: They permit cancellation or extrapolation under heterogeneity, but whether either occurs depends on the effect values and the weights.

The practical lesson is to distinguish the regression coefficient from the effect aggregation one might want to report. A coefficient with negative weights can be difficult to interpret as a population average, especially when effects differ substantially across cohort-time cells. The weight decomposition diagnoses that feature; it does not by itself establish that effects are heterogeneous or determine the disturbance contribution in an observed sample.

Check Your Understanding

Use the definitions and results above to answer the following questions.

  1. Why do the cohort-time weights sum to one even though some of them may be negative?
  2. In the three-cohort example, what makes the early cohort's period-4 weight negative?
  3. How can all cohort-time effects be positive while the expected TWFE coefficient is negative?
  4. If every cohort-time effect equals the same constant, what does the sum-to-one property imply for the treatment-effect component?
  5. Why does a conditional mean-zero disturbance assumption not make the realized TWFE coefficient exactly equal to its weighted-effects component?
Clinical Biostats