Hi all
Having read that difference-in-difference essentially is about adding an interaction term between two dummy variables indicating the period (pre / post treatment) and group (treatment / control), I decided to see if the results of a 'didregress' and 'reg' with the interaction term would be the same. It was not:
The estimated coefficients for procedure is the same between the two commands, but the standard errors are not. Now, I know that a 0,000107 difference in standard errors may seem pedantic, but for the sake of understanding how Stata commands work deep down, can anyone explain why the standard errors differ? Is it because 'reg' also provides estimates for the treated and period dummies?
Having read that difference-in-difference essentially is about adding an interaction term between two dummy variables indicating the period (pre / post treatment) and group (treatment / control), I decided to see if the results of a 'didregress' and 'reg' with the interaction term would be the same. It was not:
Code:
use https://www.stata-press.com/data/r17/hospdd, clear gen period = . replace period = 0 if inrange(month, 1, 3) replace period = 1 if inrange(month, 4, 7) gen treated = . replace treated = 0 if inrange(hospital, 19, 46) replace treated = 1 if inrange(hospital, 1, 18) reg satis i.period##i.treated, vce(cluster hospital) didregress (satis)(procedure), group(hospital) time(month)
Comment