# Re: st: Difference-in-difference regression models

 From "Austin Nichols" To statalist@hsphsun2.harvard.edu Subject Re: st: Difference-in-difference regression models Date Wed, 24 Oct 2007 12:06:17 -0400

```Riti assures me this is not a homework question.  I still think the
UCLA web book is a good place to start; I am not always clear on where
understanding about interpreting the coefs on indicator vars breaks
down...
but here goes:

clear
input score   bonus control baseline
0.4     1     0       1
0.2     1     0       1
0.1     1     0       0
0.9     1     0       0
0.5     0     1       1
0.6     0     1       1
0.7     0     1       0
0.76    0     1       0
end
g bonusbaseline=bonus*baseline
g controlbaseline=control*baseline
reg sc bonus bonusb baseline, nohe
reg sc bonus bonusb controlb, nohe

Q: What explains the difference in the
coefficients for bonusbaseline across
regression models?

A: The coef on bonusbaseline measures the increment
due to bonusbaseline, given other coefs.

In the first regression, that's
(mean over obs w/only X2=1)-[
(_cons=mean where all three X=0)+
(mean over only X1=1 less _cons)+
(mean over only X3=1 less _cons)
]=
.3-(.73+(.5-.73)+(.55-.73))=-0.02

Similarly, in the second regression,
the coef on bonusbaseline measures the
diff in means across group 1 defined
by bonus and baseline equal to 1 (obs
1 and 2, mean .3) vs group2 defined by
bonus=1 and baseline equal to 0 (obs 3
and 4, mean .5) which is -0.2

This is all probably easier to see if you:

collapse sc, by(control bonus baseline)
g bonusbaseline=bonus*baseline
g controlbaseline=control*baseline
li, noo clean
reg sc bonus bonusb baseline, nohe
reg sc bonus bonusb controlb, nohe

but no doubt someone else can give a
more accessible interpretation of regression
coefficients.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}