Hello,

I am trying to test mediation using difference-in-differences. My outcome variable is company total sales and my treatment variable is boycott (which equals 1 every year after a company is boycotted initially by consumers and 0 before that date and for control companies). I know in the traditional DID I might write:

Code:
 xtreg sales boycott $controls i.year, fe
Now my question is if I want to test whether this effect on sales by boycotts is channeled (mediated) through media tenor (positive/negative media attention), how would I do that?

Thank you in advance.

RC