Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: inteff tobit


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: inteff tobit
Date   Fri, 3 Feb 2006 06:28:27 -0600

I believe it should be "/sigma" not "_se".

For example:

.  sysuse auto 
(1978 Automobile Data)

.  qui tobit mpg len, ll(20)

.  qui sum len

.  local meanlen=r(mean)

.  nlcom
normden(-((20-(_b[len]*`meanlen'+_b[_cons]))/_b[/sigma]))*(_b[len]/_b[/sigma
])

       _nl_1:
normden(-((20-(_b[len]*187.9324324324324+_b[_cons]))/_b[/sigma]))*(_b[len]/_
b[/sigma])

---------------------------------------------------------------------------
      mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------+----------------------------------------------------------------
    _nl_1 |  -.0254299   .0034924    -7.28   0.000    -.0323903   -.0184694
---------------------------------------------------------------------------

.  mfx, predict(pr(20,.))

Marginal effects after tobit
      y  = Pr(mpg>20) (predict, pr(20,.))
         =  .45630887
----------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+------------------------------------------------------------------
length |  -.0254299      .00349   -7.28   0.000  -.032275 -.018585   187.932
----------------------------------------------------------------------------


Hope this helps,
Scott

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Bart Vanneste
> Sent: Friday, February 03, 2006 5:49 AM
> To: [email protected]
> Subject: st: inteff tobit
> 
> Dear,
> 
> How can I correctly compute an interaction effect in a
> Tobit model?
> 
> On 14 Jan 2005, May Boggess provided an example (see
> http://www.stata.com/statalist/archive/2005-01/msg00264.html).
> 
> However, using the exact same code:
> 
>  clear
>  sysuse auto
>  tobit mpg len, ll(20)
>  predict xb,xb
>  predict p, pr(20,.)     /*  Probability Uncensored */
> 
>  gen myp = norm(-((20-xb)/_b[_se]))
>  sum p myp
> 
> ----------
> 
> I get the following error message:
> .  gen myp = norm(-((20-xb)/_b[_se]))
> [_se] not found
> r(111);
> 
> end of do-file
> r(111);
> 
> ----------
> 
> Is this error message due to different versions of
> Stata? I am using Stata 9.1 for Windows.
> 
> Any suggestions or alternative approaches would be
> greatly appreciated.
> 
> Many thanks,
> Bart
> 
> 


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