Functional Data Approach to DiD
- The paper introduces a functional framework that models outcome trajectories as elements in a Banach space, enabling uniform inference over time.
- It employs double-demeaning and a functional CLT to yield estimators converging to Gaussian processes, allowing honest simultaneous confidence bands.
- Practical applications, such as studies on gender bias and employment, validate its superiority in handling parallel trends violations and anticipation effects.
The functional data approach to Difference-in-Differences (DiD) reframes the standard discrete-time panel event study within a continuous-time, infinite-dimensional stochastic process framework. Each unit’s outcome trajectory is modeled as a random element in the Banach space of continuous functions, enabling rigorous simultaneous causal inference over time intervals, not just at isolated points. This paradigm, introduced by Fang & Liebl (Fang et al., 7 Dec 2025), replaces conventional pointwise inference with uniform functional inference, directly addressing limitations in common event study plots where the parallel trends and no-anticipation assumptions may be violated. The approach yields estimators that converge to Gaussian processes, supports construction of honest simultaneous confidence bands (SCBs), and enables principled equivalence and relevance testing across intervals—transforming event study plots into comprehensive causal inference tools.
1. Functional Data Framework
Let each observational unit generate an outcome trajectory as a function in , but only discrete-time samples for are observed. Each unit is assigned a post-treatment indicator , so that observed outcomes follow the potential outcome model:
where denotes the potential outcome under treatment status . The canonical event-study DiD parameter process is defined as:
with by construction.
Under standard DiD assumptions:
- No anticipation:
- Parallel trends: for all
- Overlap: for some
it follows that , the average treatment effect on the treated at each .
To handle unit and time fixed effects, the model employs “double-demeaning” in and , resulting in the oracle regression
where , , and is a mean-zero error process in .
The least-squares estimator for is constructed as
with , .
Regularity conditions include independence of , bounded higher moments , , , , and twice-continuous differentiability of , , , and .
2. Uniform Central Limit Theorem and Gaussian Process Limit
The estimator constitutes a stochastic process indexed by in , furnished with the sup-norm . The population covariance kernel is given by:
Under the stated regularity conditions, the following functional CLT holds:
The formal proof comprises three components:
- Pointwise CLTs at each ,
- Equicontinuity bounds via C-smoothness,
- Application of functional CLT machinery (Pollard 1984; Hahn 1977; Billingsley).
No-anticipation and parallel trends are not required for this functional CLT.
3. Honest Simultaneous Confidence Bands
From the Gaussian process limit, simultaneous confidence bands in sup-norm covering are constructed as:
for in the post-treatment window . The critical value is calibrated such that
where .
Calibration approaches include:
- Parametric (Gaussian) bootstrap: Simulating GP samples at the grid, spline interpolation, and quantile computation.
- Multiplier bootstrap: Reweighting residuals by i.i.d. weights and recomputing estimators.
- Kac-Rice formula: Closed-form quantile approximation utilizing covariance curvature traces (Liebl–Reimherr 2023).
Uniform coverage is guaranteed asymptotically:
4. Equivalence Testing for Pre-Anticipation Window
Suppose a reference band for is postulated under a compound null for , with defining the anticipation window’s start. The test distinguishes:
- : such that
- : ,
Infimum SCBs are constructed:
Reject (“”) if ; reject (“”) if .
A joint -level test requires both bands to be contained within . The test enjoys asymptotic size via the functional CLT and consistent covariance estimation.
5. Relevance Testing for Post-Treatment Effects
A parallel relevance test is formulated for the post-treatment window using the same reference band:
- :
- :
Rejection occurs if the supremum confidence band fails to intersect for any . This test holds asymptotic size .
6. Empirical Validation and Applications
Simulation results indicate:
- Interpolation error decays at rate .
- Under parallel-trends violations, sup-SCB tests maintain nominal Type I error control and exhibit higher detection power than Bonferroni-corrected pointwise bands, which are invalid.
- Under anticipation, inf-SCB equivalence tests control size when the reference band coincides with during and demonstrate power against mis-specified bands.
Case studies demonstrate robust practical utility:
- For gender bias in livestreamed courts (Chen et al 2025), the honest event study plot first validates the reference band via infimum-SCB over and then confirms significant uniform post-period effects over via supremum-SCB.
- For duty-to-bargain laws and female employment (Lovenheim & Willén 2019), the reference band could not be rigorously validated (inf-SCB intersects band), yet the post-treatment sup-band fails to reject the null, indicating no significant causal effect once pre-trend is accommodated.
7. Software Implementation
The R package fdid (fang_liebl_2025_R) operationalizes the functional DiD approach by:
- Fitting the functional DiD estimator via TWFE.
- Performing natural-cubic-spline interpolation.
- Estimating the covariance surface.
- Computing sup- and inf-SCBs through parametric, multiplier, or Kac-Rice procedures.
- Executing relevance and equivalence tests.
- Rendering “honest” event-study plots.
This comprehensive workflow provides transparent, uniform inference for causal effects over time, rectifying deficiencies inherent in pointwise event study analysis (Fang et al., 7 Dec 2025).