What They Estimate — and When They Go Wrong
2026-07-27
For unit i at time t, observe (Y_{it},\, X_{it}).
| Dimension | Question answered |
|---|---|
| Within-unit (over time) | How does Y change for a given unit as X changes? |
| Cross-sectional (across units) | How do units with higher X compare to units with lower X at the same time? |
Tip
Key insight (Kropko & Kubinec 2020): These are different questions.
A good model should answer one clearly.
Case (unit) FE: Y_{it} = \alpha_i + \beta X_{it} + \varepsilon_{it}
Time FE: Y_{it} = \alpha_t + \beta X_{it} + \varepsilon_{it}
Tip
Each one-way FE model cleanly isolates one dimension.
Two groups (treated s, never-treated n) × two periods (pre/post):
\widehat{\text{DiD}} = \bigl(\bar Y_{s,2} - \bar Y_{s,1}\bigr) - \bigl(\bar Y_{n,2} - \bar Y_{n,1}\bigr)
Identifying assumption — Parallel Trends: \mathbb{E}[Y_{s,2}(0) - Y_{s,1}(0)] = \mathbb{E}[Y_{n,2}(0) - Y_{n,1}(0)]
Under parallel trends, DiD identifies the Average Treatment Effect on the Treated (ATT).
Tip
In the 2 × 2 case, TWFE is DiD. The trouble starts when we generalise.
Y_{it} = \alpha_i + \lambda_t + \beta D_{it} + \varepsilon_{it}
Standard interpretation: \beta is “the causal effect of treatment, controlling for unit- and time-level confounders.”
This interpretation is often wrong — for subtle but important reasons.
PLoS ONE 15(4): e0231349
Mathematical decomposition shows:
\hat\beta_{\text{TWFE}} = \text{weighted average of } \hat\beta_t(\tilde X)
where \tilde X_{it} = X_{it} - \bar X_i (unit-mean centred),
and \hat\beta_t is estimated on the cross-section at time t.
Equivalently (swapping roles):
\hat\beta_{\text{TWFE}} = \text{weighted average of } \hat\beta_i(\tilde X)
where \tilde X_{it} = X_{it} - \bar X_t (time-mean centred).
Plain English:
“How does a unit whose X is above its own mean compare to another unit
whose X is above its own mean, at the same point in time?”
This mixes within-unit and cross-sectional variation — precisely what one-way FE models avoid.
Kropko & Kubinec simulate TSCS data with known within-case slope \gamma and within-time slope \beta:
| Model | Recovers |
|---|---|
| Case (unit) FE | \gamma — pure over-time effect |
| Time FE | \beta — pure cross-sectional effect |
| TWFE | Something between \gamma and \beta — pooled, hard to interpret |
Including time dummies on top of unit dummies fundamentally changes the estimand — TWFE is no longer a cleaned-up version of unit FE.
Theorem (Kropko & Kubinec 2020):
If the within-unit slopes are constant across units and the within-time slopes are constant across periods, the TWFE estimator is statistically unidentified.
Why has this gone unnoticed?
Automatic multicollinearity handling in lm() and xtreg suppresses the error; results look plausible but are essentially arbitrary.
| Setting | TWFE = DiD? |
|---|---|
| 2 groups, 2 periods, binary treatment | ✅ Yes |
| 2 groups, many periods | ⚠️ Only under strong homogeneity assumptions |
| Many groups, staggered adoption | ❌ Generally no |
| Heterogeneous treatment effects | ❌ No — TWFE can be negatively weighted |
Kropko & Kubinec (2020): TWFE should be thought of as a generalised DiD only in the canonical 2 × 2 design.
Recent literature (de Chaisemartin & D’Haultfœuille 2020, 2022; Callaway & Sant’Anna 2021; Goodman-Bacon 2021) shows:
\hat\beta_{\text{TWFE}} = \sum_{g,t} w_{g,t} \cdot \text{ATT}(g,t)
where some weights w_{g,t} can be negative — earlier treated units act as “controls” for later treated units.
With heterogeneous or dynamic treatment effects, \hat\beta_{\text{TWFE}} can be the wrong sign even when all true ATTs are positive.
Time → t=1 t=2 t=3 t=4
Group A 0 1 1 1 ← treated early
Group B 0 0 1 1 ← treated mid
Group C 0 0 0 0 ← never treated
TWFE uses Group A (post-treatment) as a control for Group B in periods 3–4.
If Group A’s treatment effect grows over time, this biases \hat\beta_{\text{TWFE}} downward.
Contaminated comparisons are the rule, not the exception, in staggered designs.
Tip
Kropko & Kubinec (2020) advice: - Use unit FE if your question is about over-time change within units. - Use time FE if your question is about cross-sectional differences. - Use TWFE only in a genuine 2 × 2 DiD where assumptions are explicit.
For staggered DiD, use robust estimators: This is Friday
| Package (R) | Estimator |
|---|---|
did |
Callaway & Sant’Anna (2021) — group-time ATTs |
didimputation |
Borusyak, Jaravel & Spiess (2024) |
fixest::sunab() |
Sun & Abraham (2021) |
DIDmultiplegt |
de Chaisemartin & D’Haultfœuille (2020) |
Panel data question
│
├─ Over-time (within-unit) → Unit FE
│
├─ Cross-sectional → Time FE
│
└─ Causal treatment effect?
│
├─ 2 × 2, parallel trends → TWFE = DiD ✅
│
└─ Staggered / long panel → Use modern DiD estimators ✅
Avoid plain TWFE ❌
TWFE is not a universally robust generalisation of DiD.
It mixes dimensions, can be unidentified, and can produce negatively-weighted aggregates.
ESSSSDA26-2J: TWFE Models