# Measuring efficiency with an interaction in a Tobit model?

I am interested in how to interpret outputs generated with marginal effects after estimating a Tobit model. I am using Stata 13, so I figured I'd use the command margins - which I find very helpful. However, I am still a little bit lost when it comes to interpreting the results. I am researching firm level data in regards to innovation output and would like to understand wether certain companies use innovation input (for example Research and Development expenditures) more efficiently than others.

I have two issues:

1. Making sure that I actually estimate efficiency. I am just not sure if I am doing it correctly.
2. Understanding why the marginal effects estimated differ so immensely.

To make things a little more tangible, I figured a simulate some data and analyze them accordingly:

***Generate simulated Data
set obs 10000

*Innovation input = x

gen x=rnormal()^2

*Company type (coded as a byte)

gen t=round(runiform())

*Market environment (coded as a byte)

gen m=round(runiform())

***Functional form where y is dependen on x, t, m and an interaction of x & t

gen y=2*x-3*t+4*x*t+5*t*m+rnormal()

***Creating Tobit conditions (left censored at 0)

replace y=0 if y<0

*Tobit: Let yi be the observed var bounded from below and yi* the latent var

tobit y c.x##i.t i.m##i.t, ll(0)


The results are the following:

Tobit regression                                  Number of obs   =      10000
LR chi2(5)      =   34127.61
Prob > chi2     =     0.0000
Log likelihood = -11931.847                       Pseudo R2       =     0.5885

------------------------------------------------------------------------------
y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x |   1.998063    .010324   193.54   0.000     1.977826      2.0183
1.t |  -3.041505   .0390662   -77.86   0.000    -3.118083   -2.964928
|
t#c.x |
1  |   3.989137   .0146597   272.12   0.000     3.960401    4.017873
|
1.m |    -.03655    .029291    -1.25   0.212    -.0939662    .0208662
|
m#t |
1 1  |   5.030305   .0444715   113.11   0.000     4.943132    5.117479
|
_cons |   .0551857   .0235698     2.34   0.019     .0089841    .1013872
-------------+----------------------------------------------------------------
/sigma |   .9966572   .0080676                      .9808431    1.012471
------------------------------------------------------------------------------
Obs. summary:       2298  left-censored observations at y<=0
7702     uncensored observations
0 right-censored observations


I intepret the results as follows. x has a positive and significant effect on y. t has a negative and significant effect on y. In this example, companies of the type 2 (i.e. where t=1) are hence less innovative. The interaction term however shows companies of the type 2 generate greater returns of y per unit x invested.

However, I have some issues interpreting the marginal effects. To beginn with, I postestimated the marginal effect on the observed endogenous variable y (censored or uncesnsored).

Results marginal effects:

. margins, dydx(x) predict(ystar(0,.)) atmeans over(t)

Conditional marginal effects                      Number of obs   =      10000
Model VCE    : OIM

Expression   : E(y*|y>0), predict(ystar(0,.))
------------------------------------------------------------------------------
|            Delta-method
|      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x            |
t |
0  |   1.310562    .021878    59.90   0.000     1.267682    1.353442
1  |   5.351779   .0214539   249.46   0.000      5.30973    5.393828
------------------------------------------------------------------------------

. margins, dydx(x) predict(ystar(0,.)) at(m=(0 1)) over(t)
------------------------------------------------------------------------------
|            Delta-method
|      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x            |
_at#t |
1 0  |    1.17447   .0196007    59.92   0.000     1.136054    1.212887
1 1  |   2.626861    .024471   107.35   0.000     2.578899    2.674823
2 0  |   1.175705   .0195122    60.25   0.000     1.137462    1.213949
2 1  |   5.033166   .0211266   238.24   0.000     4.991759    5.074574
------------------------------------------------------------------------------


I interpret the output follows: Holding all covariates at their respective mean, company type 2 generates 5.35 units of y per unit x invested, whilst company type 1 only amounts to 1.31 units y per unit x invested. As such, company type 2 are on average more efficient. Moreover, this relationship increases as m increases.

Ploting the results via marginsplot results in the following:

The plot shows the respective marginal effects of x on the observed variable y at m equaling 0 and 1 for companies t=1 and t=0. It goes to show that the marginal effects are higher for t=1 at m=1. Again, I interpret the results as the efficiency increasing as m increases.

However, the results go astray, when I am estiamting and plotting the marginal effects on the latend variable:

margins, dydx(x) at(m=(0 1)) over(t)

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

Expression   : Linear prediction, predict()
dy/dx w.r.t. : x
over         : t

1._at        : 0.t
m               =           0
1.t
m               =           0

2._at        : 0.t
m               =           1
1.t
m               =           1

------------------------------------------------------------------------------
|            Delta-method
|      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x            |
_at#t |
1 0  |   2.012943    .010086   199.58   0.000     1.993175    2.032711
1 1  |   6.010168   .0109178   550.49   0.000      5.98877    6.031567
2 0  |   2.012943    .010086   199.58   0.000     1.993175    2.032711
2 1  |   6.010168   .0109178   550.49   0.000      5.98877    6.031567
------------------------------------------------------------------------------


Now, as I see it, the marginal effects of x on y remain the same - regardless of the level of m. Why is that the case? This is further substantiated when plotting the result:

I just do not get, how this comes about.

To sum up:

1. Do I actually measure "efficiency" via the way forward displayed above?
2. And, can I show altering efficiency via the help of marginal effects the way I did in the first place?
3. Why do the calculated marginal effects differ?
4. Why are the marginal effects on the latent variable the same regardless of m?

I've been boxing around with this issue for quite a while now and I can't wrap my head around it.

• Welcome to CV! On this site there's no need to say "thank you" at the end of your post - it might seem rude at first, but it's part of the philosophy of this site (tour) to "Ask questions, get answers, no distractions" and it means future readers of your question don't need to read through the pleasantries. – Silverfish Apr 28 '15 at 9:42
• Cool! Strait to the point. I like that! – Joni Apr 28 '15 at 9:48

I am not sure your code corresponds to what you think you are calculating.

Stata manuals use a strange notation that seems to be the mirror opposite of many econometrics books. $y$ is the latent variable, and instead, we observe $y^*$, which is $0$ if $y \le 0$ and $y$ otherwise.

In a Tobit model you can have at least 4 MEs, three of which are:

1. The coefficients themselves measure how the unobserved variable $y$ changes with $x$. That is the predict(xb), which is the default if you don't specify a predict() option in margins. These will be constant here for reasons I will explain below.
2. The marginal effects of the truncated expected value $E(y \vert x,y>0)$, that is among the subpopulation for which $y$ is not at the zero boundary. This is e(0,.) one below.
3. The marginal effects of the censored expected value $E(y^* \vert x, y>0)$ describe how the observed variable $y^*$ changes with respect to the regressors. That is ystar(0,.) below.

The reason you get something nearly constant is that the marginal effect of $x$ in (1) is approximately $2 + 4 \cdot t,$ which does not depend on $m$, only the level of $t$.

Here's how I would calculate each of these. Note that I set the seed at the beginning so that anyone who replicates my code will get the same result, and that I wrote the tobit covariates using a different factor variable notation.

clear
set more off
set seed 42815

set obs 10000
gen x=rnormal()^2
gen t=round(runiform())
gen m=round(runiform())
gen y=2*x-3*t+4*x*t+5*t*m+rnormal()
replace y=0 if y<0

tobit y i.(t m)##c.x, ll(0)

margins, dydx(x) at(m=(0 1) t=(0 1)) predict(e(0,.))
marginsplot

margins, dydx(x) at(m=(0 1) t=(0 1)) predict(ystar(0,.))
marginsplot

margins, dydx(x) at(m=(0 1) t=(0 1)) predict(xb)
marginsplot


The other differences is the over() vs. at(). The former calculates the ME of $x$ for each $m \times t$ combo. The latter resets everyone's $m$ and $t$ and then calculates. You seem to use a mixture of the two. It doesn't really matter here, but it can in other contexts. Here are three ways of getting the same thing:

margins, dydx(x) at(m=(0 1) t=(0 1))
margins, dydx(x) over(m t)
margins m#t, dydx(x)


Also, you seem to use the atmeans option inconsistently.

• Thanks a lot! A followup question: When does the specification over() make more or less sense than the specification at()? – Joni Apr 29 '15 at 12:25
• @Joni When the ME is non-linear (as in 2 and 3 above), if you calculate it separately for each company type with over(t), you may get differences in MEs that are due to differences in other covariates if those vary by company type. Using the at() option makes the comparison more apples to apples, since you are holding some or all of those other differences constant. – Dimitriy V. Masterov Apr 29 '15 at 17:10