Difference-in-Differences (DiD)
- Difference-in-Differences (DiD) is a causal inference method that compares outcome changes between treated and control groups under the parallel trends assumption.
- It uses a 2x2 framework to estimate average treatment effects and has been extended to accommodate staggered treatment, heterogeneous effects, and interference.
- Modern extensions address issues such as treatment misclassification and covariate adjustments, offering robust inference and sensitivity analysis techniques.
Searching arXiv for recent and foundational Difference-in-Differences papers relevant to the requested encyclopedia article. Difference-in-Differences (DiD) is a quasi-experimental and observational causal inference design that estimates the effect of a policy or intervention by comparing changes in outcomes over time in a treated group versus a comparison group. In its canonical form, DiD is built around two groups and two periods, and its central identifying restriction is the parallel trends assumption: in the absence of treatment, treated and comparison groups would have had the same average trajectory over time. Recent work emphasizes that DiD is a causal framework rather than a particular regression, that the canonical two-group/two-period design is the building block for more complex designs, and that modern practice must address conditional parallel trends, staggered treatment timing, robust inference, and settings in which the outcome, treatment, or comparison structure departs from the binary, mean-based benchmark (Feng et al., 2024, Callaway, 2022, Baker et al., 17 Mar 2025).
1. Canonical setup and core estimands
In the standard setup, units are divided into a treated group and a comparison group, with one pre-treatment period and one post-treatment period. The target parameter is usually the average treatment effect on the treated (ATT). In one common notation,
and under parallel trends,
The standard assumptions listed across the recent literature are parallel trends, no anticipation, and no spillovers/interference (Ye et al., 2020, Feng et al., 2024).
A widely used implementation is the static two-way fixed effects model
where corresponds to the ATT in simple settings, especially with one treatment time and unconditional parallel trends. A central methodological clarification is that DiD is not the same as two-way fixed effects: DiD is the causal framework or design, whereas TWFE is one estimation strategy that works well only in a subset of DiD settings (Feng et al., 2024).
The recent practitioner-oriented literature also stresses that weights are part of the estimand. Weighted and unweighted DiD can answer different questions when treatment effects are heterogeneous and correlated with size, so the choice of weights is not a merely computational detail but part of the definition of the target parameter (Baker et al., 17 Mar 2025).
2. Identification logic, parallel trends, and covariates
Parallel trends is the central DiD identifying assumption. Its content is not equality of levels but equality of untreated trajectories on average. A difference in baseline outcome levels alone is therefore not a violation of DiD; what matters is whether the untreated slopes or trends would have matched absent intervention. Recent reviews also emphasize that the plausibility of parallel trends depends on outcome functional form: if parallel trends holds in levels, it will generally not hold after a log transformation, so scale choice is part of identification rather than a cosmetic modeling decision (Feng et al., 2024).
When unconditional parallel trends is implausible, DiD can be reformulated with conditional parallel trends: This shifts attention from unconditional trend comparisons to adjustment sets and overlap. Recent work argues that covariate choice for conditional parallel trends should not be ad hoc. Using a compact graph and the backdoor criterion, it proposes a formal approach to select the variables that support conditional parallel trends, and it shows that unconditional and conditional parallel trends can conflict with one another. It also clarifies that a time-invariant covariate with a time-invariant effect on the outcome may still be a useful conditioning variable, and that adjustment for a post-treatment covariate depends on what causes that covariate to change (Rodrigues et al., 1 May 2026).
This suggests that a large share of applied controversy around DiD is not about the arithmetic of differencing but about whether the adjustment set aligns with the identifying assumption. The recent variable-selection literature explicitly recasts several familiar estimation problems as a mismatch between the adjustment set required for identification and the adjustment set actually used by default in the estimator (Rodrigues et al., 1 May 2026).
3. Estimation, event studies, and staggered adoption
In the simple design, the sample DiD contrast is equivalent to the interaction coefficient in a basic regression, and with balanced panel data it can also be obtained from a regression of outcome changes on treatment status (Baker et al., 17 Mar 2025). With multiple periods, DiD is often implemented with event-study specifications,
which are used to display pre-treatment coefficients and post-treatment dynamics (Feng et al., 2024).
The principal modern warning is that standard TWFE can fail in staggered adoption settings. When treatment timing varies and treatment effects are heterogeneous across cohorts or over time, TWFE averages many comparisons, some of which use already-treated units as controls for later-treated units. This can generate negative weights, contaminated control groups, biased estimates, and in some cases sign-flipped estimates (Feng et al., 2024, Callaway, 2022). The natural primitive estimands in staggered designs are therefore group-time or cohort-time treatment effects such as
which are then aggregated into cohort-specific, period-specific, dynamic, or overall summaries (Callaway, 2022, Deng et al., 4 Mar 2026).
The recommended estimators in this literature estimate group-time or cohort-time effects directly and aggregate them transparently. The papers summarized in recent reviews specifically recommend Callaway and Sant’Anna, Sun and Abraham, and Borusyak, Jaravel, and Spiess, while also discussing stacked regression and imputation approaches (Feng et al., 2024, Callaway, 2022). Recent semiparametric work extends this logic to time-varying covariates by defining group-period ATTs nonparametrically and proposing doubly robust estimators in the form of augmented inverse variance weighting, with a simplified augmented inverse probability weighting form under a homoskedastic working model (Deng et al., 4 Mar 2026).
Diagnostics in this setting are informative but limited. Visual inspection of pre-trends and event-study plots remains standard, yet recent reviews stress that traditional pre-trend tests often have low power, that a non-significant pre-trend test does not prove parallel trends, and that conditioning the analysis on “passing” a pre-trend test can induce selection bias (Feng et al., 2024). A recent proposal turns the length of the pre-treatment window into a tuning parameter and selects the pre-trend length that minimizes estimated mean squared error, thereby formalizing the bias-variance tradeoff induced by imperfect parallel trends and finite-sample variance (Igarashi, 6 May 2026).
4. Relaxing parallel trends and conducting sensitivity analysis
A large recent literature treats parallel trends not as a binary requirement but as an assumption that may be weakened, bracketed, or perturbed. One strategy uses two control groups whose untreated trends relative to the treated group are negatively related. Under a monotone trends assumption,
0
the ATT is partially identified by union bounds: 1 This bracketing approach also develops a bootstrap tailored to the nonstandard min/max structure and a falsification test based on unused pre-treatment periods (Ye et al., 2020).
A related but distinct approach reinterprets parallel trends as a restriction on selection bias. In that framework, the post-treatment selection bias is assumed to lie in the convex hull of selection biases available from a baseline information set that may include multiple pre-treatment periods, baseline covariates, or other data sources. The resulting generalized DiD produces sharp bounds for the ATT that always contain the standard DiD estimand and extend to multiple treatment periods (Ban et al., 2022).
Sensitivity analysis for hidden bias has also been developed within matched DiD designs. One matched-design approach removes overt bias from observed baseline covariates before DiD is applied, then quantifies how strong hidden bias from time-varying unmeasured confounding would need to be to alter the substantive conclusion. The analysis yields worst-case bounds on the sign alignment of treatment assignment and residual DiD contrasts, and it provides implementations for both continuous and binary outcomes (Keele et al., 2019).
More recent work combines DiD with Double Machine Learning and Riesz Representation. In that formulation, the analyst compares a long or oracle model that conditions on observed and unobserved confounders with a short or feasible model that conditions only on observed covariates, then derives asymptotic bias bounds for the ATT and group-time ATT estimands. The sensitivity parameters can be calibrated using pre-testing, benchmarking by leaving out observed covariates, and robustness values or contour plots (Bach et al., 10 Oct 2025).
A distinct identification threat is treatment misclassification. Under arbitrary misclassification, the standard DID estimand is not the ATT but a weighted difference involving correctly classified and misclassified treated groups, and it can have the wrong sign. Under nondifferential misclassification plus monotonicity, however, DID is attenuated toward zero. If the extent of misclassification can be bounded, the ATT is partially identified by simple sensitivity bounds (Denteh et al., 2022).
5. Beyond mean effects and binary treatment
Several recent contributions extend DiD beyond additive mean effects. One universal nonparametric framework replaces parallel trends with odds ratio equi-confounding (OREC), which requires that the generalized odds ratio relating treatment and treatment-free potential outcome is stable across pre- and post-treatment periods. Under OREC, the counterfactual distribution of 2 is identified nonparametrically, which in turn identifies treatment effects on the treated on general effect scales, including ATT and quantile treatment effects, for continuous, binary, count, or mixed outcomes (Park et al., 2022).
A related semi-parametric cumulative probability model (CPM) places DiD on a latent transformed scale: 3 The identifying assumption becomes conditional latent variable parallel trends,
4
and this single assumption identifies ATT, quantile treatment effects among the treated, probability treatment effects among the treated, and a Mann-Whitney treatment effect among the treated without requiring the analyst to choose a specific outcome transformation (Thome et al., 13 Jun 2025).
Distributional DiD moves from mean contrasts to full-law comparisons. One recent framework learns a control-group drift map using optimal transport,
5
applies it to the treated group’s pre-treatment law to construct a counterfactual post-treatment distribution 6, and tests
7
with a maximum mean discrepancy statistic in a reproducing kernel Hilbert space. This makes the design sensitive to location, scale, shape, and tail behavior rather than only to mean shifts (Bhattacharjee et al., 20 Jun 2026).
Another extension replaces linear subtraction by geodesic comparison in unique geodesic metric spaces. Geodesic DiD defines outcomes in a bounded, separable metric space 8, uses Fréchet means as the analogue of expectations, and defines the geodesic average treatment effect on the treated as
9
This framework covers distributions, networks, and manifold-valued data, and it extends to staggered adoption through group-time geodesic ATTs (Zhou et al., 29 Jan 2025).
DiD has also been generalized from binary treatment status to general treatment doses. A recent non-bipartite matching framework considers two time points with treatment changes
0
forms matched pairs of units with similar baseline covariates but different treatment trajectories, and defines a sample average DID ratio,
1
together with a post-matching randomization condition that is presented as the design-based counterpart to the traditional parallel-trends assumption. The framework accommodates binary, ordinal, and continuous treatments, preserves the full treatment-dose information, avoids parametric outcome models, and does not rely on stayers or quasi-stayers (Heng et al., 26 Nov 2025).
6. Interference, repeated cross sections, and constrained data environments
Classical DiD presumes that a unit’s outcome depends only on its own treatment. Recent work shows that canonical DID estimators generally fail to identify interesting causal effects in the presence of neighborhood interference, because treated and untreated units can face different distributions of neighborhood exposure. One response is to introduce an exposure mapping 2, formulate a modified parallel trends assumption conditional on exposure level, and estimate direct average treatment effects on the treated and average spillover effects with doubly robust estimators (Xu, 2023).
A closely related line of work allows both interference and network dependency, so that outcomes, treatments, and covariates may exhibit between-unit latent correlation. In that setting the estimand is the average exposure effect on the exposed,
3
identified under consistency, interference through exposure mapping, no anticipation, positivity, and conditional parallel trends. The proposed doubly robust estimator remains consistent under suitable network dependency conditions, is asymptotically normal, and has variance reaching the semiparametric efficiency bound (Jetsupphasuk et al., 5 Feb 2025).
Repeated cross-sectional DiD introduces a different complication: the covariate distribution may change across time periods. Recent semiparametric theory therefore drops stationarity of 4 over time, derives the efficient influence function and the semiparametric efficiency bound for the ATT under compositional changes, and proposes nonparametric doubly robust estimators together with a Hausman-type test comparing a robust estimator to a stationarity-based estimator. The resulting bias-variance tradeoff is explicit: ignoring compositional change can bias the ATT, but ruling it out when it is true improves efficiency (Sant'Anna et al., 2023).
Finally, DiD can be adapted to privacy-constrained or legally siloed environments in which treated and control data are not poolable. The unpoolable-data framework replaces pooled estimation with within-silo estimation plus a final combination step. Without covariates, the unpoolable-data estimator and conventional DiD are equal and unbiased; with covariates, both methods remain unbiased and converge to the true value, although the estimates may differ slightly while inference and substantive conclusions remain the same. This extends to multiple groups and staggered adoption (Karim et al., 2024).
Across these extensions, a common pattern is visible. DiD remains a design based on comparing changes over time, but recent research recasts what can count as a “difference,” what can count as a “control,” and what assumptions are needed when treatments are staggered, dosed, mismeasured, interfering, or embedded in complex outcome spaces. The canonical parallel-trends design therefore remains the reference point, while contemporary methodology enlarges the class of admissible estimands, data structures, and inferential strategies (Callaway, 2022, Baker et al., 17 Mar 2025).