Difference in Difference with multiple period (pre, during, and post treatment) I was wondering if someone can help me understand how I should formulate my difference in difference regression. Under a basic two period DiD, I would be estimating an equation similar to:
$$
y_{gt} = \beta_0 +\beta_1 Time_t + \beta_2 Group_g +\beta_3 Time\times Group_{gt} + \epsilon_{gt}
$$
Where g denotes the group and t denotes the time.
However, I am trying to model a difference in difference, but I have time periods representing pre-treatment, during treatment, and post-treatment. I'm not sure how to capture the effects of the treatment. Originally I was thinking 
$$
y_{gt}=\beta_0 +\beta_1Post_t +\beta_2Pre_t +\beta_3 Group_g+\beta_4Post\times Group_{gt}+\beta_5 Pre  \times Group_{gt}+\epsilon_{gt}
$$
But I'm uncertain if this would capture the effect of the treatment. Furthermore, I'm fairly new to Diff in Diff, so I'm no sure what the interaction beta's might imply and whether or not it captures the effect
Can someone help?
 A: Let $t=1,2,3$ and $T=1$ if treated, zero otherwise. $\mathbf{I}$ is the indicator function. The expected value from the specification I suggested in the comments above is
$$E[Y \vert X] = \beta_0 + \beta_1 T + \beta_2 \mathbf{I}_{t=2}+\beta_3 \mathbf{I}_{t=3}+\beta_4 \mathbf{I}_{t=2} \cdot T + \beta_5 \cdot \mathbf{I}_{t=3} \cdot T.$$
The DID for the third (post) period would be:
$$\left( E[Y \vert T=1,t=3]-E[Y \vert T=1,t=1] \right)-\left( E[Y \vert T=0,t=3]-E[Y \vert T=0,t=1] \right) = \beta_5.$$
The DID for the second (during) period would be:
$$\left( E[Y \vert T=1,t=2]-E[Y \vert T=1,t=1] \right)-\left( E[Y \vert T=0,t=2]-E[Y \vert T=0,t=1] \right) = \beta_4.$$ 
If $\beta_5>0,$ it is plausible that $\beta_4<0$. One example might be graduate school, where the treated observations earn very little money while enrolled. You might consider adding the foregone income on the cost side of the programs.
In other settings, $\beta_5>\beta_4>0.$ This might be the case if the treatment is adoption of new technology, where there is a learning period before it becomes fully productive.
