Hi all!


I have a panel data (gvkey - firm id and fyear- time). I create a Law indicator for states that adopted a certain law at different times (staggered adoption). It is a dummy taking the value of one after the firm (gvkey) adopts this law during my sample period, zero otherwise. Here is the model I use: reghdfe Dependent LawDummy Controls, absorb() cluster()

Since the dependent variable is constructed using data over the past several years (the estimation period spanning the previous five years might hinder correct inferences from the comparison between the pre- and post- periods), I want to use the following two methods to make enough lead-lag time for my difference-in-differences research design.

First approach: I want to create a dummy variable, one for lead1 lead2 lead3 lead4, and 0 for lag1 lag2 lag3 lag4, with no missing observations within these 8 years. So that I can compare the differences between lead1/2/3/4 vs lag 1/2/3/4.

Another approach to address this concern is to exclude observations from the four years immediately following the Law adoption year.

Anyone knows how to write the code for these analysis? And which approach is better? Thank you in advance for your help!!