Identify · Chapter 8 of 12
Panel data and difference-in-differences
Objective: Derive difference-in-differences, separate fixed effects from identification, and quantify a transparent trend sensitivity.
Would the training offices have improved even without the program?
Panel data · Fixed effects · DiD · Sensitivity
Before you begin: Potential outcomes (chapter 5), group means, regression (chapter 3), and sampling uncertainty (chapter 4).
About 30 minutes, plus the exercises.
Difference-in-differences
In a synthetic firm, offices adopting training increase output from 50 to 62 units per employee. Comparison offices increase from 40 to 46. The trained offices improve by 12; the comparison offices improve by 6. Difference-in-differences reports .
Why subtract six? Because we are proposing that the comparison group’s change describes what would have happened to the training group without training. We can observe three relevant pieces: the training group’s earlier outcome, its later treated outcome, and the comparison group’s change. The training group’s later untreated outcome is missing.
A second date supplies a comparison over time. It does not automatically supply the missing counterfactual.
Derive the two-by-two result
Let identify the group that starts treatment between dates 0 and 1; identifies the untreated comparison group. Let be an outcome without treatment and the treated outcome at date 1. Assume consistency, no spillovers, and no anticipation, so the training group is untreated at date 0. Its target effect is
Define the observable difference-in-differences as
Add and subtract . The result is
where
Parallel trends sets . The groups may have different initial levels. What must match is their mean untreated change over the relevant interval. The observed ten-unit baseline difference causes no algebraic difficulty.
For a panel, we also need the sample and outcome definitions to represent the intended population at both dates. A repeated cross-section can identify a similar target under appropriate stable-composition and sampling assumptions. Replacing departing workers with more productive recruits can otherwise produce an apparent training effect through composition.
Fixed effects remove a particular kind of difference
A familiar panel regression is
captures time-invariant unit differences, common date effects, and treatment status. Within-unit transformations remove . They leave time-varying omitted determinants intact.
In a balanced two-group, two-date setting with the appropriate group and time indicators, the treatment-interaction coefficient equals the difference-in-differences contrast. Its causal meaning still comes from the counterfactual assumptions. In more general panels, a constant causal interpretation of needs additional restrictions on effects and on the relation between treatment and disturbances. Writing “unit and year fixed effects” is not a substitute for stating those restrictions.
Consider offices selected for training because management already expects their orders to recover. That expectation may cause a differential untreated trend. Neither office effects nor a common year effect removes it.
Staggered adoption changes the comparison
When offices adopt at different dates, define as first treatment date and consider
is the outcome under adoption at ; is the outcome under no adoption. Identification requires specifying valid untreated comparisons for each cohort and date, such as never-treated or still-untreated units, with suitable no-anticipation, parallel-trends, and overlap conditions.
A conventional two-way fixed-effects coefficient can compare newly treated units with already treated units. If effects change with exposure time or differ across cohorts, those comparisons need not recover a useful average causal effect; implied weights can be problematic. Callaway and Sant’Anna organize estimation around cohort-time effects and explicit aggregation.
Aggregation itself answers a question. Weighting each office equally, each worker equally, or each cohort equally produces different targets. State the weights and which cohort-time cells are supported by untreated comparisons.
Pre-trend diagnostics
Pre-treatment outcomes can expose implausible comparisons. A visible differential pre-trend is a warning. An insignificant pre-trend test, however, may simply be imprecise. It cannot demonstrate that an unobserved post-treatment counterfactual satisfies parallel trends.
Every plotted coefficient also has a construction: reference period, comparison group, and aggregation. Modern estimators’ pre-treatment coefficients need not be built symmetrically with their post-treatment effects. Check the construction before applying a familiar visual heuristic.
Inference must reflect the dependence structure. Repeated observations in an office are not independent replications of the treatment assignment. Clustered inference often matters; few assignment clusters require methods and caution suited to that design. A large employee count does not manufacture a large number of independently treated offices.
Sensitivity to parallel trends
Suppose substantive knowledge supports output units. Since , the population sensitivity interval is
At and , the interval is . If each extra output unit is worth $100 and training costs $300 per employee, the corresponding net-benefit interval is dollars. A positive baseline effect need not imply a decision robust to the specified trend uncertainty.
# Synthetic group means and an assumed population trend bound.
treated_change = 62 - 50
comparison_change = 46 - 40
dd, M = treated_change - comparison_change, 4
effect_bounds = (dd - M, dd + M)
net_bounds = tuple(100 * effect - 300 for effect in effect_bounds)
print(dd, effect_bounds, net_bounds) # 6 (2, 10) (-100, 700)
The design experiment exposes this calculation. Its interval excludes sampling uncertainty. It does not implement HonestDiD. Rambachan and Roth develop formal restrictions and inference that connect pre-treatment evidence to allowed post-treatment violations. Choosing a restriction remains substantive work.
Exercises
1. A firm’s is 6. Suppose the training offices would have improved two units more than comparison offices without training. What is ?
Work through the solution
The differential untreated change is . Thus . The observed training-group change remains 12. Its implied untreated change is , leaving a treatment effect of .
2. Retain the $100 value per output unit and $300 cost. What largest symmetric trend bound guarantees nonnegative net benefit when , ignoring sampling uncertainty?
Work through the solution
The worst permitted effect is . Require , so . At , worst-case net benefit is zero. Strictly positive worst-case benefit requires . An estimated would introduce sampling uncertainty into a real decision.
Further reading
Use The Remix for extended design examples, Callaway and Sant’Anna for multiple-period targets, and Rambachan and Roth for structured sensitivity.
Write the claim and the assumption doing the most work. Saved only in this browser on this device; avoid sensitive information. Private browsing or clearing site data can erase it.
Notes are optional.
“Explored” records your choice, not a score or a claim of mastery.