Negative Weights in Staggered DiD
de Chaisemartin–D’Haultfœuille vs. Goodman-Bacon
From 2×2 DiD to staggered TWFE
Adapted and expanded from the author’s Chinese notes, July 2024
Why can two-way fixed effects (TWFE) put negative weights on treatment effects when the Goodman-Bacon weights are positive? The two decompositions average different things. Goodman-Bacon averages \(2\times2\) difference-in-differences (DiD) estimators. De Chaisemartin–D’Haultfœuille (dCDH) weights treatment effects in treated group-period cells. A DiD can subtract an effect even when the weight on that DiD is positive. (Goodman-Bacon 2021; de Chaisemartin and D’Haultfœuille 2020)
Following the original notes, we start from the familiar \(2\times2\) DiD. Two questions stay separate: does a comparison subtract a control group’s changing treatment effect, and does TWFE equal the ATT we want to report? Answering the first need not settle the second.
The 2×2 starting point
Start with two groups and two periods; one group is treated in period 2.
| Treatment status | Period 1 | Period 2 |
|---|---|---|
| Treated group \(T\) | 0 | 1 |
| Comparison group \(C\) | 0 | 0 |
Let \(Y_{g,t}\) be the mean outcome of group \(g\) in period \(t\), and \(\Delta_{g,t}\) the average treatment effect (ATE) in that cell. The DiD is
\[ DID=(Y_{T,2}-Y_{T,1})-(Y_{C,2}-Y_{C,1}). \tag{1}\]
Under common trends and no anticipation, the expected DiD is the treated cell’s expected effect, \(\mathbb E[\Delta_{T,2}]\). With sample means, it is also the OLS estimate of \(\beta_3\) below, where \(\mathrm{Treat}_g\) marks the treated group and \(\mathrm{Post}_t\) marks period 2:
\[ \begin{aligned} Y_{i,g,t}={}&\beta_0+\beta_1\,\mathrm{Treat}_g+\beta_2\,\mathrm{Post}_t\\ &+\beta_3\,\mathrm{Treat}_g\times\mathrm{Post}_t+u_{i,g,t}. \end{aligned} \tag{2}\]
With more units and dates, group fixed effects \(\alpha_g\) and period fixed effects \(\lambda_t\) replace \(\mathrm{Treat}_g\) and \(\mathrm{Post}_t\), and the treatment indicator \(D_{g,t}\) replaces their product. This is the TWFE regression, with OLS estimate \(\widehat\beta_{fe}\):
\[ Y_{i,g,t}=\alpha_g+\lambda_t+\beta_{fe}D_{g,t}+u_{i,g,t}. \tag{3}\]
In the \(2\times2\) case it still equals the DiD. Fixed effects are not the problem; the problem appears when groups start treatment at different dates. TWFE then combines several DiDs, and some use already-treated groups as controls.
A two-group, three-period example
Now let treatment start at different dates. Use Goodman-Bacon’s labels: \(k\) is the early timing group and \(\ell\) the late timing group. Here \(k=2\) and \(\ell=3\) are their treatment dates. The groups have equal sizes. Once treated, they remain treated.
| Treatment status | Period 1 | Period 2 | Period 3 |
|---|---|---|---|
| Early group \(k\) | 0 | 1 | 1 |
| Late group \(\ell\) | 0 | 0 | 1 |
A tilde marks an expectation that holds the treatment design fixed; the assumptions below define it. There are three treated effects: \(\widetilde\Delta_{k,2}\), \(\widetilde\Delta_{k,3}\), and \(\widetilde\Delta_{\ell,3}\). As in dCDH’s two-group illustration, call the two expected DiD comparisons \(DID_1\) and \(DID_2\).
Early versus late, periods 1–2. The late group is untreated at both dates, so this is a standard DiD. Under common trends,
\[ \begin{aligned} DID_1 &=\mathbb E[(Y_{k,2}-Y_{k,1})-(Y_{\ell,2}-Y_{\ell,1})\mid\mathbf D]\\ &=\widetilde\Delta_{k,2}. \end{aligned} \tag{4}\]
Late versus early, periods 2–3. The late group enters treatment. The early group is already treated at both dates:
\[ \begin{aligned} DID_2 &=\mathbb E[(Y_{\ell,3}-Y_{\ell,2})-(Y_{k,3}-Y_{k,2})\mid\mathbf D]\\ &=\widetilde\Delta_{\ell,3} -(\widetilde\Delta_{k,3}-\widetilde\Delta_{k,2}). \end{aligned} \tag{5}\]
Both comparisons remove the common untreated trend. The second also subtracts the change in the early group’s treatment effect. If that effect grows, \(DID_2\) understates the late group’s effect. Common trends can hold exactly and this subtraction still occurs. (de Chaisemartin and D’Haultfœuille 2020, sec. II.A; Goodman-Bacon 2021, equation (14c))
Comparisons that use already-treated units as controls are called forbidden comparisons (Borusyak et al. 2024). The July 2024 notes used this name for \(DID_2\). The name points to the subtracted effect change, not to a failure of common trends. Suppose the early effect does not change: it jumps once when treatment starts and then stays at that level. Then the extra term is zero and \(DID_2=\widetilde\Delta_{\ell,3}\). The outcome itself can keep trending; only the effect must stay fixed.
One coefficient, two decompositions
In this design, each DiD receives weight \(1/2\). Substituting the effects gives
\[ \begin{aligned} \widetilde\beta_{fe} &=\tfrac12 DID_1+\tfrac12 DID_2\\ &=\tfrac12\widetilde\Delta_{k,2} +\tfrac12[\widetilde\Delta_{\ell,3} -(\widetilde\Delta_{k,3}-\widetilde\Delta_{k,2})]\\ &=\widetilde\Delta_{k,2} -\tfrac12\widetilde\Delta_{k,3} +\tfrac12\widetilde\Delta_{\ell,3}. \end{aligned} \tag{6}\]
The first line is Goodman-Bacon’s decomposition. It averages DiDs, and both weights are positive. The last line is dCDH’s decomposition. It averages effects, and the early group’s period-3 effect receives weight \(-1/2\). This negative weight does not come from a negative weight on a DiD. It comes from inside \(DID_2\), the forbidden comparison, which subtracts that effect.
| Goodman-Bacon | dCDH | |
|---|---|---|
| What is averaged? | \(2\times2\) DiD estimators | ATEs in treated cells |
| Weights in this example | \(1/2,\;1/2\) | \(1,\;-1/2,\;1/2\) |
| What can we inspect? | Which comparisons enter TWFE | Which effects receive negative weights |
| Software | bacondecomp (Stata, R) |
twowayfeweights (Stata, R) |
Both decompositions are available in standard software. bacondecomp lists each comparison with its weight; the R version labels the type of \(DID_1\) “Earlier vs Later Treated” and the type of \(DID_2\) “Later vs Earlier Treated.” dCDH’s twowayfeweights reports the weight on each treated cell’s effect, together with the number and sum of negative weights. In this example, one of the three cell weights is negative, and the negative weights sum to \(-1/2\).
For the lab’s starting values, set the three effects to \((1,5,1)\) and untreated outcomes to zero. Then \(DID_1=1\) and \(DID_2=1-(5-1)=-3\). TWFE equals \(-1\), although all three effects are positive. The ATT across treated observations is \(7/3\).
Both groups can have the same effect pattern: 1 when treatment begins and 5 one period later. The negative coefficient needs neither a violation of common trends nor sampling noise. The numerical values illustrate the decomposition; the weights \(1/2\) apply to this particular design.
Lab step 1: move the three effects and watch both decompositions update →
What the example assumes
The note uses a balanced panel: group sizes \(N_{g,t}\) are constant over time, treatment \(D_{g,t}\) is binary and stays on once it starts, no group is treated in period 1, some may never be, and there are no covariates. With \(\mathbf D\) collecting all treatment indicators, a tilde denotes an expectation that holds the design fixed:
\[ \widetilde\Delta_{g,t}=\mathbb E[\Delta_{g,t}\mid\mathbf D], \qquad \widetilde\beta_{fe}=\mathbb E[\widehat\beta_{fe}\mid\mathbf D]. \tag{7}\]
Causal statements assume common trends in untreated outcomes and no anticipation; effects may still differ across groups and change after treatment. Goodman-Bacon’s decomposition is an exact identity for the sample coefficient, while dCDH’s holds for its expectation under these assumptions. The lab has no sampling noise, so its \(\Delta_{g,t}\) equals \(\widetilde\Delta_{g,t}\). The appendix states the assumptions in full.
From the example to a larger panel
Goodman-Bacon groups units by treatment date. A \(2\times2\) DiD compares two timing groups across two time windows. A window may contain several periods. Its mean uses all those periods, rather than a selected pair of dates.
There are three types of comparisons: treated versus never treated; early versus late before late treatment; and late versus early after early treatment. The last type uses an already-treated group as the control; it is the forbidden comparison of the example. The comparison weights are positive and sum to one. They depend on timing and group sizes, not on outcome or effect values. The sample identity itself does not require common trends. (Goodman-Bacon 2021, Theorem 1)
dCDH instead writes the expected coefficient as
\[ \widetilde\beta_{fe} =\sum_{(g,t):D_{g,t}=1}W_{g,t}\widetilde\Delta_{g,t}, \qquad \sum_{(g,t):D_{g,t}=1}W_{g,t}=1. \tag{8}\]
\(W_{g,t}\) follows the notation in dCDH’s introduction. It is the coefficient multiplying a cell’s effect. In Theorem 1, the authors write it as \((N_{g,t}/N_1)w_{g,t}\), where \(N_1\) counts treated observations. Thus \(W_{g,t}\) includes the cell’s share of treated observations; \(w_{g,t}\) does not. The lab displays \(W\), using this same convention.
A treated cell has a negative \(W_{g,t}\) when its treatment residual, \(\varepsilon_{g,t}\), is negative. This residual comes from regressing treatment on the fixed effects. Early groups are treated in many periods. Late periods contain many treated units. Together, these features can produce a negative residual in an early group’s later periods. Not every staggered design has negative weights. (de Chaisemartin and D’Haultfœuille 2020, Theorem 1 and Proposition 1)
To connect the decompositions, expand each weighted DiD into its outcome means. Under the outcome assumptions, untreated trends cancel. The coefficients left on a treated cell’s effect sum to \(W_{g,t}\). A Goodman-Bacon weight applies to the whole comparison, rather than to any single cell. The appendix gives the formulas and their notation in each paper.
Lab step 5: where negative weights appear in an 8 × 12 panel →
When effects do not change over time
The July 2024 notes concluded that TWFE is free of this bias only when treatment effects do not change over time, and that such effects are uncommon in practice. The example confirms the mechanism: if each group’s effect stays constant after treatment, the forbidden comparison subtracts nothing. Two refinements make the conclusion precise.
First define the ATT
Use dCDH’s ATT, conditional on the treatment design:
\[ \widetilde\Delta^{TR} =\sum_{(g,t):D_{g,t}=1}\frac{N_{g,t}}{N_1}\widetilde\Delta_{g,t}, \qquad N_1=\sum_{g,t}N_{g,t}D_{g,t}. \tag{9}\]
It averages effects across treated observations, so a unit observed in two treated periods contributes twice. The lab uses this ATT. Goodman-Bacon’s parameter is instead VWATT, the variance-weighted average treatment effect on the treated. It averages the treatment group’s ATT in each DiD’s post window, using the regression’s positive comparison weights. The two need not agree. (Goodman-Bacon 2021, equation (15) and Section 3.1.1)
Constant effects remove the subtraction, not the weighting
If every treated effect is equal, TWFE, VWATT, and the ATT coincide, even if some cell weights are negative. Negative weights alone do not prove bias.
Now let effects differ across groups but stay constant over time. In Goodman-Bacon’s notation, these effects are \(ATT_k\) and \(ATT_\ell\):
\[ \widetilde\Delta_{k,2}=\widetilde\Delta_{k,3}=ATT_k, \qquad \widetilde\Delta_{\ell,3}=ATT_\ell. \]
Then \(DID_1=ATT_k\) and \(DID_2=ATT_\ell\). Yet
\[ \widetilde\beta_{fe}=\frac{ATT_k+ATT_\ell}{2}, \quad \widetilde\Delta^{TR}=\frac{2ATT_k+ATT_\ell}{3}. \tag{10}\]
TWFE gives each group half the weight, which here equals VWATT. The ATT gives the early group two-thirds because it has two treated periods. At \((ATT_k,ATT_\ell)=(1,3)\), TWFE is \(2\) and the ATT is \(5/3\). The gap comes from how the averages weight groups, not from any subtraction. The early group’s cell weights, \(1\) and \(-1/2\), multiply the same effect and combine to \(1/2\). That is how negative cell weights coexist with Goodman-Bacon’s positive weights.
“Only when” is too strong
Time-constant effects are sufficient to remove the subtraction, but not necessary for TWFE to equal the ATT. At \((1,2,6)\), the early effect grows and \(DID_2=6-(2-1)=5\) still subtracts a change. Yet TWFE and the ATT both equal \(3\). Changing one effect breaks this coincidence, so it does not justify TWFE when effects are unknown. The appendix gives the general condition.
| Effects | \((\widetilde\Delta_{k,2},\widetilde\Delta_{k,3},\widetilde\Delta_{\ell,3})\) | Early control’s effect change | TWFE | ATT | Lab |
|---|---|---|---|---|---|
| Same in all cells | \((2,2,2)\) | \(0\) | \(2\) | \(2\) | Step 2 |
| Constant within groups | \((1,1,3)\) | \(0\) | \(2\) | \(5/3\) | Step 3 |
| Growing early effect | \((1,5,1)\) | \(4\) | \(-1\) | \(7/3\) | Step 1 |
| Changing effects, equal averages | \((1,2,6)\) | \(1\) | \(3\) | \(3\) | Step 4 |
State both the restriction on effects and the average of interest. Time-constant effects remove the forbidden comparison’s subtraction and let TWFE recover VWATT under common trends. They need not make TWFE equal the ATT. The original mechanism stands. Effects often build up or fade after treatment, so its practical advice stands too.
When every group is treated
In period 3, neither group supplies an untreated observation. Common trends and no anticipation alone cannot identify both unrestricted period-3 effects. To see why, raise both untreated period-3 means by the same amount and lower both effects by that amount. Observed outcomes stay the same. TWFE also stays the same because its period-3 weights sum to zero. The ATT changes.
Keeping only the first DiD identifies the early group’s period-2 effect. It does not identify the full ATT. Effects in later periods require an untreated comparison or an additional restriction, such as constant effects. A regression does not establish that restriction. This calculation illustrates the assumptions’ limits; it is not an additional decomposition theorem.
What to do in practice
The July 2024 notes ended with practical advice. When treatment starts at different dates, do not rely on the TWFE coefficient alone. This applies to a single static coefficient and to an event study. The advice stands.
- Diagnose the design. Goodman-Bacon’s decomposition shows how much weight goes to forbidden comparisons. dCDH’s weights show which cell effects receive negative weights, how many, and their sum. These diagnostics show how exposed TWFE is to changing effects. Neither proves bias in a particular application. Lab step 7 shows both summaries for a simulated panel.
- Name the target. Decide which average answers the question: the ATT across treated observations, an average by timing group, or effects by time since treatment.
- Avoid forbidden comparisons. Heterogeneity-robust estimators compare treated units only with units that are not yet treated or never treated. Callaway and Sant’Anna (2021) estimate an ATT for each timing group and date, then aggregate. Borusyak et al. (2024) impute untreated outcomes using untreated observations. dCDH also propose an estimator that compares groups whose treatment changes with groups whose treatment does not (de Chaisemartin and D’Haultfœuille 2020). Their later survey reviews these methods (de Chaisemartin and D’Haultfœuille 2023).
- Check event studies too. Sun and Abraham (2021) show that a TWFE event-study coefficient for one period relative to treatment can mix in effects from other periods. Their estimator and those above avoid this.
No estimator removes the limit in the previous section. Effects in periods without an untreated comparison still require an additional restriction.
Use the interactive lab
The lab follows this note in eight steps. Step 0 is the \(2\times2\) case. Steps 1–4 load the two-group example with the four sets of effects in the table above. Three sliders set the effects, and the lab writes out Equation 6 with the current numbers. Steps 5–7 move to larger panels: where negative weights appear, what changes without a never-treated group, and what the diagnostics report. Each step links back to its section here. Free exploration loads any design and lets you edit effects, treatment dates, and group sizes.
Moving an effect leaves the treatment design, and therefore every weight, unchanged. Only the weighted effects change. In Panel View, \(\Delta\) is the assigned cell effect, \(W\) its dCDH weight, and \(W\Delta\) their product; a negative product need not mean a negative weight. Click a Goodman-Bacon comparison to see its four outcome means. Click a dCDH term to see how the comparisons add up to its cell weight.
The lab generates outcomes without sampling noise. Its effects are known because the reader sets them. They are not estimates recovered from observed data. In particular, the simulated linear untreated trend does not supply an assumption for identifying late effects in real data.
The technical appendix contains the notation correspondence, proofs, and calculation formulas. The references include the two papers and the estimators named above.