Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

st: centering in heckman with marginal effects

 From Lisa Marie Yarnell To "statalist@hsphsun2.harvard.edu" Subject st: centering in heckman with marginal effects Date Mon, 30 Jul 2012 18:44:59 -0700 (PDT)

```Hi Stata listserv,

We are running heckman models where we will eventually include interaction terms. To avoid multicollinearity, we centered the main effects terms before cross-multiplying. Centering our main effects variables does not alter the beta estimates in the model, but we found that centering does alter the elasticities calculated from the marginal effects produced after the model.

With the non-centered terms we find that a 10% increase in Externalizing, for example, is associated with a 4.2% increase in score on our dependent variable (Output 1). With the centered terms, this marginal effect is wiped away; a 10% increase in Externalizing is not associated with an increase in score on our dependent variable (0.0% increase; Output 2). Though in the example below the marginal effect is ns, in some of our models, a marginal significant effect was lost due to the centering.

This is not due to the effect being estimated at a different point along the estimated curve because Externalizing centered is zero. So in Output 1, the marginal effect is estimated at X = .294633, which is the number subtracted from all scores in creating the centered term. In Output 2, the marginal effect is estimated at X ~ 0 (but this is the same score as the .294633 on the uncentered variable).

Why would centering variables remove our marginal effects (here, losing the 4.2% increase effect) while not changing the estimated beta in the model itself?

Thanks, Lisa Yarnell

Output 1
mfx, dyex varlist (inter_av exter_av)
Elasticities after heckman
y  = Linear prediction (predict)
= -3.2730144
------------------------------------------------------------------------------
variable |      dy/ex    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
inter_av |   .1215912      .29626    0.41   0.681  -.459067  .702249   .235831
exter_av |   .4214362      .28299    1.49   0.136  -.133209  .976081   .294633
------------------------------------------------------------------------------

Output 2
mfx, dyex varlist (inter_cent exter_cent)
Elasticities after heckman
y  = Linear prediction (predict)
= -3.2730144
------------------------------------------------------------------------------
variable |      dy/ex    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
inter_cent |  -1.65e-06      .00000   -0.41   0.681  -9.5e-06  6.2e-06  -3.2e-06
exter_cent |  -.0002096      .00014   -1.49   0.136  -.000485  .000066  -.000147
------------------------------------------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```