Hello,

I am trying to understand how to perform a Diff-in-Diff-in-Diff (DDD) in Stata as explained by Imbens and Wooldridge (2007). The application will be used to see if political fragmentation (enep) in countries from the Eurozone (emu) was more sensitive to financial bailouts (imf) only when emu took place (from 1999 onwards) compared to the rest. The data that I am using covers countries from emu and not emu in the period 1954-2020. The three relevant binary variables are: emu, imf and post1999.

My question is whether I should use this model specification:
Code:
xtpcse enep i.imf_cycle##i.post##i.emu i.c i.year, hetonly
Or this other specification:
Code:
g did=treatment*post1999*emu
g imfpost=imf*post
g imfemu=imf*emu
g postemu=imf*emu
xtpcse enep imfpost imfemu postemu did i.c i.year, hetonly
Thank you very much for your superb help.

Rubén