I've estimated a diff-in-diff using Stata - very simple situation:

y = b0 + b1 T + b2 P + b3 TxP + e

T = 1 means treatment, 0 is control. P = 1 means post treatment, 0 is pre-treatment.

Problem: The coefficient on the constant term in my diff-in-diff regression (using Stata 14) is very high. As a sensibility check on my estimates, my sense was that if I want to, say, back out what the value of outcome y is for my control group post-treatment, I add the constant (b0) and the coefficient on post-treatment (b1). However, my constant is incredibly high and yields a number that is an order of magnitude larger than what the mean for control post-treatment is and is no where near the value.

The coefficient on my interaction, b3 (see fig. 1), is the exact same as a manual calculation of diff-in-diff using means by treatment-time (see fig. 2). That seems reassuring but the constant being so high as to be nonsensical is worrying.

Should I be worried? What, if anything, is going wrong here?

Figure 1

Figure 2


(1) We've got clean data, no issues of treatment assignment or time.

(2) Out total sample is 800 people across 30 sub-districts.

(3) We cluster errors at the sub-district level.

(4) Treatment assignment was not random - people selected into the program.

(5) Moreover, we have people who are in control and people who are in treatment from within each sub district i.e. each sub-district has roughly the same number of control people and treatment people.

  • $\begingroup$ Where is that table output coming from? (That looks like something coming out of esttab rather than the raw stata output?) What's the exact Stata command you're entering and what's the exact output in the console? My guess is that you have (or are triggering) some bug on the table output. To really diagnose this precisely, one would probably need some sharing of commands and data sufficient to trigger the behavior. $\endgroup$ – Matthew Gunn Feb 23 at 21:29
  • $\begingroup$ (1/2) @MatthewGunn Many thanks for replying. So, it turns out that this was something quite daft on my end. What you suggest - copying out the code here - would have given the answer: you would have picked up on what went wrong. So, my period dummy was not coded 0 and 1, rather it was the actual year i.e. 1990 and 1991 (I'm disguising the years so the exact constant value will be different). As you likely have guessed by this point, this is what was going wrong with my constant! $\endgroup$ – Ali A Feb 24 at 18:16
  • $\begingroup$ (2/2) Once I replaced it with an actual zero for 1990 and an actual one for 1991, it immediately spat out a sensible constant term. I am so sorry for the trouble and this ultimately being a trivial issue. [insert Homer Simpson saying "D'oh" gif] Thank you! $\endgroup$ – Ali A Feb 24 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.