Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: marginal effects


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: Re: marginal effects
Date   Wed, 23 Jul 2003 19:48:53 -0500

----- Original Message -----
From: "Marina Balboa" <[email protected]>
To: <[email protected]>
Sent: Wednesday, July 23, 2003 11:37 AM
Subject: st: marginal effects


> Dear statalist,
>
> I tried to send the same mail but it does never arrive to the list. I hope
this one does.
>
> I solved my doubt this weekend, but it still remains one. I want to calculate
the marginal effects for the observed censored variable "y*" in xttobit (not the
latent variable, "y". In the manual "y*" also refers to the observed variable
and "y" to the latent, doesn't it?). I can work with the conditional or
unconditional expectation. The variable y* is censored at zero.
>
> To calculate marginal effects using E(y* |x, y*>0) (and assuming u_i=0), I
type
> "mfx compute, predict(ystar0(0,.))"
>
> To calculate E(y* |x) (u_i=0), I type
> "mfx compute, predict(ystar0(.,.))". However, this latter option gives me the
same coefficients as the ones in the result of xttobit, which are the ones for
the latent variable. Wouldn't be the coefficients I should obtain with this
command the result of multiplying the betas of the xttobit by the
normprob(x*beta)?
>
> Thanks a lot in advance for any hint you could give me. It will be much
welcomed.
> Sincerely,
> Marina Balboa
>

Marina,

mfx compute, predict(e(lower_bound, upper_bound)) gives the marginal effects for
the expected value of y conditional on being uncensored.

mfx compute, predict(ys(lower_bound, upper_bound) gives the marginal effects for
the unconditional expected value of y.

In both cases, you need to specify the left and / or right censoring point.

Example:

. use "C:\Stata8\auto.dta", clear
(1978 Automobile Data)

. replace price = 4000 if price <4000
(11 real changes made)

. xttobit price mpg, ll(4000) i(foreign) nolog

Random-effects tobit regression                 Number of obs      =        74
Group variable (i): foreign                     Number of groups   =         2

Random effects u_i ~ Gaussian                   Obs per group: min =        22
                                                               avg =      37.0
                                                               max =        52

                                                Wald chi2(1)       =     25.39
Log likelihood  = -597.93768                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -327.9141    65.0826    -5.04   0.000    -455.4736   -200.3545
       _cons |   13099.53   1578.574     8.30   0.000     10005.58    16193.48
-------------+----------------------------------------------------------------
    /sigma_u |   707.8464   527.0417     1.34   0.179    -325.1364    1740.829
    /sigma_e |   2762.649   252.5473    10.94   0.000     2267.665    3257.632
-------------+----------------------------------------------------------------
         rho |   .0616045   .0871224                      .0016116    .4454072
------------------------------------------------------------------------------

  Observation summary:        63     uncensored observations
                              11  left-censored observations
                               0 right-censored observations

. mfx compute, nose

Marginal effects after xttobit
      y  = Fitted values (predict)
         =  6115.8478
-------------------------------------------------------------------------------
                        variable |          dy/dx                 X
---------------------------------+---------------------------------------------
                             mpg |       -327.9141            21.2973
-------------------------------------------------------------------------------

. ****This is the latent value.



. mfx compute, nose predict(p(4000,.))

Marginal effects after xttobit
      y  = Pr(price>4000) (predict, p(4000,.))
         =  .77092933
-------------------------------------------------------------------------------
                        variable |          dy/dx                 X
---------------------------------+---------------------------------------------
                             mpg |       -.0348347            21.2973
-------------------------------------------------------------------------------

. ****This is the marginal effects for the probability of being uncensored


. mfx compute, nose predict(e(4000,.))

Marginal effects after xttobit
      y  = E(price|price>4000) (predict, e(4000,.))
         =  7236.5842
-------------------------------------------------------------------------------
                        variable |          dy/dx                 X
---------------------------------+---------------------------------------------
                             mpg |       -181.6677            21.2973
-------------------------------------------------------------------------------

. ****The marginal effects for the expected value of y conditional on being
uncensored


. mfx compute, nose predict(ys(4000,.))

Marginal effects after xttobit
      y  = E(price*|price>4000) (predict, ys(4000,.))
         =  6495.1777
-------------------------------------------------------------------------------
                        variable |          dy/dx                 X
---------------------------------+---------------------------------------------
                             mpg |       -252.7986            21.2973
-------------------------------------------------------------------------------

. ****The marginal effects for the unconditional expected value of y

.


Hope this helps,
Scott


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index