Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tobit: what is the difference between the reported coefficients and the e(b) coefficient tvector?

    I'm using esttab / estout to report results of a left-censored tobit-regression.

    The reported coefficients in tobit are different from the coefficients in esttab/ estout. I understand that esttab/estout use the e(b) coefficient vector. What is the difference between those two outputs?

    My code:
    Code:
    * tobit regression
    
    tobit doninc_a ib1.sex age c.age#c.age d11107 hhgr ///
            ib3.casmin_comp ib2.*bbil_comp ///
            ib3.famstd_comp ///
            hgihinc_a_sqrsc c.hgihinc_a_sqrsc#c.hgihinc_a_sqrsc ///
            wealth c.wealth#c.wealth ///
            ib0.hvid, ll(0)
    
    eststo doninc_a
    
    * esttab
    estout doninc_a
    My results:
    tobit-results.png

    estout.png





    Already by focusing on female, respectively 1.sex, the results differ even in the sign.

    Obviously there is a difference in the coefficients reported by tobit and those by estout. Any help is much appreciated.
    Last edited by Caspar Aumueller; 06 Jan 2016, 08:45.

  • #2
    I'm sorry, every time i try to rescale the second image it just jumps back to this size after saving.

    Comment


    • #3
      This is indeed strange. Iv'e tried replicating this by estimating tobit on the auto.dta installed with stata, and could not. estout/esttab returned the same coefficents.

      What I would suggest is that after the estimation, type
      matrix list e(b)

      to see the coefficents vector directly.

      Comment


      • #4
        Thank you. Indeed matrix list e(b) returns the right values. I also found that when i do everything by hand the errors doesn't show up. In the original code the tobit regression is wrapped in foreach-loop to go over multiple dep. variables. I have will edit the loop once i found out where to edit non-recent posts and will also try to replicate the problem with the auto-file.

        Meanwhile:
        Code:
        * tobit regression, left-censored with age-, wealth- and income-dummies, no interaction terms *
        * define dependent variables
        local depvar = "givings doninc_a donwealth_a"
        * loop over variables
        foreach var in `depvar'{
             tobit `var' ib1.sex age c.age#c.age d11107 hhgr ///
                ib3.casmin_comp ib2.*bbil_comp ///
                ib3.famstd_comp ///
                hgihinc_a_sqrsc c.hgihinc_a_sqrsc#c.hgihinc_a_sqrsc ///
                wealth c.wealth#c.wealth ///
                ib0.hvid, ll(0)
            eststo `var'
            if `var' == donwealth_a{
            quietly: tobit `var' ib1.sex age c.age#c.age d11107 hhgr ///
                ib3.casmin_comp ib2.*bbil_comp ///
                ib3.famstd_comp ///
                hgihinc_a_sqrsc c.hgihinc_a_sqrsc#c.hgihinc_a_sqrsc ///
                wealth c.wealth#c.wealth ///
                ib0.hvid, ll(-1)
            eststo `var'    
            }
        }
        estout `depvar', cells("b(star fmt(3)) se") stats(N p)
        
        eststo clear
        Some more: The problems lies within tobit donwealth_a (after the if-clause). Whin i add matrix list e(b) after that regression i get the coefficients from estout which are different from those i get from tobit.
        Last edited by Caspar Aumueller; 06 Jan 2016, 11:07. Reason: Found something more.

        Comment


        • #5
          To me it looks like if the dependent variable is downwealth_a your'e running two models - the first one and the other one after the if conditon. for debugging purposes I would remove the quietly prefix and my guess is that you will see that the coefficents you see with estout. and since you run two models but save just the last one (which you run "quietly") that's why your'e getting different estimates - so It's not an issue with tobit or estout but just with your code.

          Also, you should probably use "eststo:" as a prefix so it will save all the models you run and save you a command line too

          Comment


          • #6
            Ok. Its a new day and everything works fine. Also i don't know exactly why. Of course it is in 99.99 % of the time an issue with tho code - everything else would mean that stata is not reliable (which is not the case, so it has to be an issue with my code).

            Anyhow: Please note that it is not a question of running tobit quietly or not. I ran it twice now to check and both results are the same(anything else would by a bit worrying).
            If one uses eststo as prefix the estimates are stored as "est1", "est2" and so forth. By running eststo separately i can define the name of the estimate. In this case they are stored under the name of `var' which is the name of the dependent variable.

            I will edit or post more, ones i figured out what exactly the problem was.

            Thank you for your help!

            Comment

            Working...
            X