|
⇤ ← Revision 1 as of 2025-10-15 17:05:54
Size: 1799
Comment: Initial commit
|
← Revision 2 as of 2026-09-01 04:43:05 ⇥
Size: 1842
Comment: Note
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 31: | Line 31: |
| The method is generally implemented using [[Statistics/OrdinaryLeastSquares|OLS regression]]. | This model can be re-expressed in the general linear model, and can therefore be fit by [[Statistics/OrdinaryLeastSquares|OLS regression]]. |
| Line 33: | Line 33: |
| Given indicators ''T'' where ''T,,t,,=1'' if time period ''t'' is the second one, and ''S'' where ''S,,i,,=1'' if observation ''i'' is in the treatment group, fit the following model: | Given indicators ''T'' where ''T,,t,,=1'' if time period ''t'' is the second one, and ''S'' where ''S,,i,,=1'' if observation ''i'' is in the treatment group, the model is written: |
Difference in Differences
Difference in differences is a quasi-experimental method.
Description
The method can be expressed as:
where A, B, C, and D represent sample statistics; and where A and C are from treated samples. There is an assumption of parallel trends: absent treatment, AC should be parallel to BD as average change would have been equivalent.
The interpretation becomes:
- B is the baseline average
- D-B is the time trend
- A-B is the difference between groups
- (C-A)-(D-B) is the difference in differences
Implementation
This model can be re-expressed in the general linear model, and can therefore be fit by OLS regression.
Given indicators T where Tt=1 if time period t is the second one, and S where Si=1 if observation i is in the treatment group, the model is written:
Yit = β0 + β1Tt + β2Si + β3(TtSi) + ϵit
The coefficients can be interpreted as:
β0 is the baseline average
β1 is the time trend
β2 is the difference between groups
β3 is the difference in differences
Fixed effects for both units and time periods are generally included, leading to these being called two-way fixed effects models.
Alternatively, calculate the first differenced outcomes as Y'i = Yi2 - Yi1. Now fit the model:
Y'i = β1 + β3Si + (ϵi2 - ϵi1)
Once again, β3 is the difference in differences.
