flexpaneldid: A Stata Toolbox for Causal Analysis with Varying Treatment Time and Duration
The paper presents a modification of the matching and difference-in-differences approach of Heckman et al. (1998) for the staggered treatment adoption design and a Stata tool that implements the approach. This flexible conditional difference-in-differences approach is particularly useful for causal analysis of treatments with varying start dates and varying treatment durations. Introducing more flexibility enables the user to consider individual treatment periods for the treated observations and thus circumventing problems arising in canonical difference-in-differences approaches. The open-source flexpaneldid toolbox for Stata implements the developed approach and allows comprehensive robustness checks and quality tests. The core of the paper gives comprehensive examples to explain the use of the commands and its options on the basis of a publicly accessible data set.