Hello!

I am doing DID, Event study and Triple differences, but it is not easy for me to make the right codes. Could you explain about the coding?

I don't know exactly which variables I should use as "i.treated" "i.t" "i.treated#i.t". And I am using Stata 16 and Stata 16 said to me it cannot use "diff". For your information, please see the attached including my coding.

reg y i.treated i.t i.treated#i.t
diff y, period(time) treated(treat)


If you let me know, it would be very helpful for me. Thank you very much in advance.


Sincerely,
Jihye Lee