4
$\begingroup$

I am reading the Imbens et al. 2009 paper on program evaluation methods: http://dash.harvard.edu/bitstream/handle/1/3043416/imbens_recent.pdf?sequence=2

On page 24, discussing simple regression methods for estimating the average treatment effect, they write:

"This estimator is also obtained from the coefficient on the treatment indicator $W_i$ in the regression $Y_i$ on $1, W_i, X_i, W_i·(X_i-\bar{X})$."

Can someone please explain to me why the covariates in the interaction term need to be demeaned here? I would have thought that if the non-interacted covariates enter the regression unadjusted, then they should be likewise unadjusted in the interaction term. But apparently my intuition is wrong.

Thanks.

$\endgroup$
4
$\begingroup$

I believe this is done to avoid having the reader do the arithmetic. In the simple linear model,

$$E[Y_i \vert X] = \alpha + \beta W_i + \gamma X_i + \psi X_i \cdot W_i. $$

The marginal effect of $W$ is $\beta +\psi X_i$, which is a function of $X$, and so the average marginal effect is $\beta +\psi \bar X$. The reader would need to know what $\bar X$ was to figure it out.

In the second version of the model,

$$E[Y_i \vert X_i] = \alpha + \beta W_i + \gamma X_i + \psi (X_i - \bar X) \cdot W_i. $$

The marginal effect of $W$ is $\beta +\psi (X_i - \bar X)$, which is a function of $X$. Here $\beta$ is the average marginal effect, so you don't need to do any arithmetic. Another way to think about it is that in the second model, $\beta$ is the effect of $W$ for someone with the average $X$, and because the model is linear, that is also the average marginal effect.

Here's an example with Stata. First we fit the simple model:

. sysuse auto, clear
(1978 Automobile Data)

. reg price i.foreign##c.weight

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(3, 70)        =     26.20
       Model |   335885357         3   111961786   Prob > F        =    0.0000
    Residual |   299180039        70  4274000.55   R-squared       =    0.5289
-------------+----------------------------------   Adj R-squared   =    0.5087
       Total |   635065396        73  8699525.97   Root MSE        =    2067.4

----------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         foreign |
        Foreign  |  -2171.597   2829.409    -0.77   0.445    -7814.676    3471.482
          weight |   2.994814   .4163132     7.19   0.000     2.164503    3.825124
                 |
foreign#c.weight |
        Foreign  |   2.367227   1.121973     2.11   0.038      .129522    4.604931
                 |
           _cons |  -3861.719   1410.404    -2.74   0.008    -6674.681   -1048.757
----------------------------------------------------------------------------------

Now we use margins to calculate the AME:

. margins, dydx(foreign) at((mean) weight)

Conditional marginal effects                    Number of obs     =         74
Model VCE    : OLS

Expression   : Linear prediction, predict()
dy/dx w.r.t. : 1.foreign
at           : weight          =    3019.459 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     foreign |
    Foreign  |   4976.148   910.5648     5.46   0.000     3160.084    6792.212
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Here we do it the demeaned way:

. qui sum weight

. gen dm_weight = weigh -r(mean)

. reg price i.foreign c.weight i1.foreign#c.dm_weight

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(3, 70)        =     26.20
       Model |   335885358         3   111961786   Prob > F        =    0.0000
    Residual |   299180039        70  4274000.55   R-squared       =    0.5289
-------------+----------------------------------   Adj R-squared   =    0.5087
       Total |   635065396        73  8699525.97   Root MSE        =    2067.4

-------------------------------------------------------------------------------------
              price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------------+----------------------------------------------------------------
            foreign |
           Foreign  |   4976.148   910.5648     5.46   0.000     3160.084    6792.212
             weight |   2.994814   .4163132     7.19   0.000     2.164503    3.825124
                    |
foreign#c.dm_weight |
           Foreign  |   2.367227   1.121973     2.11   0.038      .129522    4.604931
                    |
              _cons |  -3861.719   1410.404    -2.74   0.008    -6674.681   -1048.757
-------------------------------------------------------------------------------------

Note that the foreign coefficient matches the output of margins closely, including the standard error.

$\endgroup$
1
  • $\begingroup$ Thanks for the explanation and detailed example Dimitriy. Makes sense. $\endgroup$ – Yakkanomica May 3 '15 at 13:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.