# regression difference in differences with multiple treatment period and Granger test

I'm currently working on an unbalanced panel data which contains 10000 + individuals and at most (at least) ten (five) years observations. A type of treatment happens to some of the individuals but at different time (multiple treatment periods), except the treatment effect, I also want to test if consequence happen before treatment (Granger test, Granger 1969). There is a reference in Mostly Harmless about this problem, also in this post with equation like this : $$\text{Y}_{ist}=\gamma_s+\lambda_t+\sum^m_{\tau=0}\delta_{-\tau}\text{D}_{s,t-\tau}+\sum^q_{\tau=1}\delta_{+\tau}\text{D}_{s,t+\tau}+\text{X}'_{ist}\beta+\varepsilon_{ist} \tag1$$

However, it's unclear neither in the Mostly Harmless nor the reference that how to specify the second term in the equation, cause in the standard DID, we have:

$$y_{it}=\alpha_0+\alpha_1\text{Treat}_i+\alpha_2\text{After}_t+\delta(\text{Treat*After})_{it}+x'_{it}\beta+FFE+TFE+\varepsilon_{it} \tag2$$

Where Treat * After equal "D" in the first equation.

So should we include an "After" for each of the 'D' in equation (1), or something else? Or, how to construct the second term in equation (1) anyway?

• sorry for the reference part cause I can't add more than two of them and I can't type math equation here, so I chose to post equations here to make things clear. And it would also be great if you can direct me to a place to learn how to write math equation in a post. – Jason Goal Mar 24 '17 at 6:14
• This tutorial might be helpful: MathJax basic tutorial and quick reference. Also, see my edit and please add references. – T.E.G. Mar 24 '17 at 7:13
• thanks a lot @T.E.G, you make thing much more beautiful than me – Jason Goal Mar 24 '17 at 7:24
• Granger test? If you mean Granger causality, we have a tag for that, you may include it. – Richard Hardy Mar 24 '17 at 8:22
• yes ,Granger causality. – Jason Goal Mar 24 '17 at 12:10