# Triple difference regression to allow for intervention at different time periods

I am interested in running a diff-in-diff-in-diff model on panel data that allows for a policy intervention to occur in different entities (in my case, states) at different times.

The non-flexible triple diff model I have specified is the following standard model (sorry for imprecise notation):

Yist = α + B1Treat + B2Type + B3Post + λ1(Type∗Treat) + λ2(Type∗Post) + λ3 (Treat∗Post) + δ1(Type∗Treat∗Post) + ϵist

However, I would like to allow different entities to enter the Post period at different times. I know that there is a generalizable diff-in-diff model that allows for this, and that it looks like the following.

Yist = α + B1(Treat) + λ(year dummy) + δ(TreatxPost) + ϵist

I'm not clear on how to extrapolate from the generalizable diff-in-diff to the generalizable triple difference model. Any insight would be greatly appreciated.

It's not clear from your question, but if what you want is to take into account the effect of "time to enacting" (before and after), then what you are looking for is not a simple diff-in-diff design, but an "event study design" such as: $$Y_{ist}=\alpha + x_{st}\beta + \sum_{j=-K}^{-1} \gamma_j\cdot 1(t-tr_s=j) + \sum_{j=1}^{H} \gamma_j\cdot 1(t-tr=j)+\epsilon_{its}$$
where $tr_s$ is the year the policy was enacted in state $j$ and $1(t-tr_s=j)$ is an indicator function =1 if "years to event (policy enactment)" in state $s$ is equal to $j$. Your coefficients of interest in this case are the $\gamma_j$'s.