Tools › Statistics › Regression and Modeling › Difference-in-Differences and ITS › Example
Difference-in-differences from a published two-by-two table: four means, standard deviations and counts
| Tool | Difference-in-Differences and ITS |
| Source | original |
| Level | Undergraduate |
Problem
A report gives the mean test score, its standard deviation and the number of students for a treated and a comparison school, before and after a tutoring program (different students each year). Compute the difference-in-differences and its interval from the summary alone.
Inputs to Enter
- Analysis: four means. Treated before 41.2 (SD 9.8, n 120), after 47.9 (10.4, 118); comparison before 40.6 (10.1, 135), after 42.3 (9.9, 131)
- Variances: unequal (Satterthwaite); confidence level 95 %
Answers
- Estimate = (47.9 − 41.2) − (42.3 − 40.6) = 6.7 − 1.7 = 5.00; counterfactual 41.2 + 1.7 = 42.90, so the estimate is 11.7 % of it
- Unequal variances: SE = √(9.8²/120 + 10.4²/118 + 10.1²/135 + 9.9²/131) = 1.795, 490.9 degrees of freedom, t = 2.79, p = 0.0055, interval 1.47 to 8.53
- Pooled variance: s_p = 10.049, SE = 1.793 on 500 degrees of freedom, interval 1.48 to 8.52
Notes
Choose the analysis Difference-in-differences: four means in the tool; its opening values are this case. Original illustrative numbers. Both errors take the four cells as independent samples; when the same people are measured twice, the rows are needed. The pooled error equals the classical regression error on the underlying rows (checked in the tool test). The estimate is a statistical association under parallel trends, not a finding of cause.
More Examples for This Tool
- Difference-in-differences on 14 clinics: an estimate that classical errors call clear and clustered errors do not
- Difference-in-differences on 20 stores over 8 months: estimate, clustered interval and event study
- When difference-in-differences misleads: a gap that was already growing before the change
- Interrupted time series of 48 months: a level drop with no change of slope, Newey-West errors
- Interrupted time series: no jump at the intervention, the trend bends