1
$\begingroup$

I am researching firm level data. My endogenous variable is bounded from above and below. Thus I use a Tobit model to take account of the truncation. Among others I am interacting a continuous with a categorical variable - the latter being a firm type (dummy 0;1). I want to know if there are differences between the two types. So far I find significant results for the interaction. I was now advised to estimate marginal effects and to contrast them. But frankly, I don't know what contrasting really actually means. I estimated the marginal effects for each group (I know there are several ME after Tobit, I chose ME on the observed variable). But what does contrasting mean? Given that I use Stata 13, my question is following:

What is stata's command margins contrast intended for and when and how does it make sense to use as a post estimation to a tobit model?

$\endgroup$
  • 1
    $\begingroup$ Questions about how Stata works, eg, are off topic here, but you have a real statistical question buried here. You may want to edit your question to clarify the underlying statistical issue. You may find that when you understand the statistical concepts here, the Stata-specific elements are self-evident or at least easy to get from the documentation. $\endgroup$ – gung Jun 18 '15 at 21:30
1
$\begingroup$

Here's the explanation of what contrasting margins means.

Let's fit a toy Tobit model (you could also use intreg), where we interact the foreign dummy with weight:

sysuse auto, clear
generate wgt=weight/1000
tobit mpg i.foreign##c.wgt c.headroom, ll(17) ul(30)

This yields:

Tobit regression                                Number of obs     =         74
                                                LR chi2(4)        =      91.39
                                                Prob > chi2       =     0.0000
Log likelihood = -138.22086                     Pseudo R2         =     0.2484

-------------------------------------------------------------------------------
          mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
      foreign |
     Foreign  |   10.16688   5.332589     1.91   0.061     -.468634    20.80239
          wgt |  -6.120729   .8351949    -7.33   0.000    -7.786473   -4.454986
              |
foreign#c.wgt |
     Foreign  |  -5.356987   2.229552    -2.40   0.019    -9.803689   -.9102848
              |
     headroom |  -.5758296    .503259    -1.14   0.256    -1.579548    .4278888
        _cons |   41.58485   2.453002    16.95   0.000     36.69249    46.47721
--------------+----------------------------------------------------------------
       /sigma |   2.945599   .3107564                      2.325815    3.565383
-------------------------------------------------------------------------------
            18  left-censored observations at mpg <= 17
            49     uncensored observations
             7 right-censored observations at mpg >= 30

Now we will take the derivative of mpg with respect to wgt as if all cars were foreign and subtract from that the derivative of mpg with respect to wgt as if all cars were domestic (r. means relative to the base level of foreign):

. margins r.foreign, dydx(wgt) predict(ystar(17,30))

Contrasts of average marginal effects
Model VCE    : OIM

Expression   : E(mpg*|17<mpg<30), predict(ystar(17,30))
dy/dx w.r.t. : wgt

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
wgt          |
     foreign |          1        0.43     0.5134
------------------------------------------------

------------------------------------------------------------------------
                       |   Contrast Delta-method
                       |      dy/dx   Std. Err.     [95% Conf. Interval]
-----------------------+------------------------------------------------
wgt                    |
               foreign |
(Foreign vs Domestic)  |  -.3044572   .4658221     -1.217452    .6085373
------------------------------------------------------------------------

This tells you that the difference in the censored mpg-wgt slope between foreign cars and domestic cars is -.3: a 1000 lbs increase in weight is associated with an additional .3 mpg reduction in efficiency for foreign cars compared to domestic, but that gap is not statistically different from zero. Notice how different that is compared to the effect

We can also do things by hand in two steps (first get the two derivatives, and then take their difference):

. margins, dydx(wgt) at(foreign=(0 1)) predict(ystar(17,30)) post

Average marginal effects                        Number of obs     =         74
Model VCE    : OIM

Expression   : E(mpg*|17<mpg<30), predict(ystar(17,30))
dy/dx w.r.t. : wgt

1._at        : foreign         =           0

2._at        : foreign         =           1

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
wgt          |
         _at |
          1  |  -4.237398   .3787365   -11.19   0.000    -4.979708   -3.495088
          2  |  -4.541855   .2690925   -16.88   0.000    -5.069267   -4.014443
------------------------------------------------------------------------------

. lincom _b[2._at]-_b[1._at]

 ( 1)  - [wgt]1bn._at + [wgt]2._at = 0

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.3044572   .4658221    -0.65   0.513    -1.217452    .6085373
------------------------------------------------------------------------------

This gets you the same answer.

$\endgroup$
  • $\begingroup$ Perfect, thanks a lot! One follow up question: Do you know that the difference in the slope is not significant, because the conf. interval overlaps zero? $\endgroup$ – Rachel Jun 19 '15 at 6:49
  • $\begingroup$ Yes, but you can also see that the p-value for the null that the difference is zero is .513. $\endgroup$ – Dimitriy V. Masterov Jun 19 '15 at 6:52
  • $\begingroup$ Is there a possibilite to get a p-value via the means of contrast too? $\endgroup$ – Rachel Jun 19 '15 at 6:53
  • $\begingroup$ It's the p>chi2 parameter $\endgroup$ – Dimitriy V. Masterov Jun 19 '15 at 7:18

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.