Announcement

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

  • Using eststo and esttab commands

    Dear All,
    After estimating a Censored Least Absolute Deviations (CLAD) model: Please see results
    Code:
    . clad total age hhsize agesqrd hhsizesqrd yrsch farming oil_state male urban , ll(0)
    
    Initial sample size = 6717
    Final sample size = 4815
    Pseudo R2 = .25870996
    
    Bootstrap statistics
    
    Variable |   Reps   Observed       Bias   Std. Err.   [95% Conf. Interval]
    ---------+-------------------------------------------------------------------
         age |    100   .0057274   .0009211   .0034553   -.0011285  .0125834  (N)
             |                                           -.0008584  .0129774  (P)
             |                                           -.0040769  .0099529 (BC)
    ---------+-------------------------------------------------------------------
      hhsize |    100   .0585884  -.0018335    .004073    .0505067  .0666701  (N)
             |                                            .0489682  .0654285  (P)
             |                                            .0519287  .0686922 (BC)
    ---------+-------------------------------------------------------------------
     agesqrd |    100  -.0000775   -.000011   .0000454   -.0001677  .0000126  (N)
             |                                           -.0001686  .0000135  (P)
             |                                            -.000136  .0000481 (BC)
    ---------+-------------------------------------------------------------------
    hhsizesqrd |    100  -.0010378   .0000992   .0002291   -.0014925 -.0005832  (N)
             |                                            -.001462 -.0005585  (P)
             |                                           -.0015309 -.0007454 (BC)
    ---------+-------------------------------------------------------------------
       yrsch |    100   -.004813   .0001847   .0005417   -.0058878 -.0037382  (N)
             |                                           -.0056864 -.0035192  (P)
             |                                           -.0060999 -.0038368 (BC)
    ---------+-------------------------------------------------------------------
     farming |    100  -.0032381   .0018049   .0060932   -.0153284  .0088522  (N)
             |                                           -.0132315  .0107072  (P)
             |                                           -.0172892  .0051545 (BC)
    ---------+-------------------------------------------------------------------
    oil_states |    100  -.0393742  -.0001108   .0075107   -.0542772 -.0244713  (N)
             |                                           -.0583671 -.0253307  (P)
             |                                           -.0583671 -.0253307 (BC)
    ---------+-------------------------------------------------------------------
        male |    100  -.0564424   .0009888   .0073611   -.0710485 -.0418363  (N)
             |                                           -.0695243 -.0419172  (P)
             |                                           -.0713053 -.0432157 (BC)
    ---------+-------------------------------------------------------------------
       urban |    100  -.0232882   .0016635   .0054712   -.0341443 -.0124321  (N)
             |                                           -.0311881 -.0100771  (P)
             |                                           -.0313772 -.0132427 (BC)
    ---------+-------------------------------------------------------------------
       const |    100  -.1714408  -.0154698   .0650137   -.3004421 -.0424395  (N)
             |                                            -.312512 -.0427268  (P)
             |                                           -.2625595 -.0074853 (BC)
    -----------------------------------------------------------------------------
                                  N = normal, P = percentile, BC = bias-corrected
    
    .
    end of do-file
    Now I want to display/export the output using the
    HTML Code:
    esttab
    command:
    Code:
    esttab
    
    ----------------------------
                          (1)  
                        total  
    ----------------------------
    age               0.00939***
                       (3.38)  
    
    hhsize             0.0596***
                      (51.53)  
    
    agesqrd         -0.000125***
                      (-3.48)  
    
    hhsizesqrd       -0.00106***
                     (-27.20)  
    
    yrsch            -0.00478***
                     (-10.77)  
    
    farming          -0.00288  
                      (-0.65)  
    
    oil_states        -0.0463***
                      (-7.51)  
    
    male              -0.0536***
                     (-10.34)  
    
    urban             -0.0288***
                      (-6.89)  
    
    _cons              -0.243***
                      (-4.64)  
    ----------------------------
    N                    4730  
    ----------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    I was expecting the coefficient of age in the first table (.0057274) to be the same with coefficient on the second table (0.00939***). I don't know why this difference and how to address it.

    Any help welcome.
    Thanks,
    Dapel
    Last edited by Zuhumnan Dapel; 24 Apr 2017, 04:46.

  • #2
    The results in e(b), which is what esttab uses, are not the results you want. Refer to https://www.stata.com/statalist/arch.../msg00207.html.


    In principle, yes indeed. In practice I recognise none of the authors as
    people active on Statalist. Previous questions on -clad- on this list
    have been answered by other people if at all.

    I don't know how much benefit there would be in updating -clad-, but my
    strong guess is anyone who wants that will have to do it themselves.

    Let's be clear: this is a simple downside of user-written software.
    User-programmers are busy people and their interests can shift like
    anybody else's. Sometimes they write something in Stata and then they
    get too busy, or their interests change, or they get using other
    software. Upshot: they may feel no obligation to maintain their
    programs. It's as basic as that.

    Also, user-users have an obligation not to be dopey and to look
    carefully at what they are using. Only the other day I was asked offlist
    whether a program of mine written in 1998 -- this fact had been
    emphasised in an earlier mail -- supported a statistic published in
    2001.

    Nick
    [email protected]

    Martin Weiss

    "In this case, it is not reasonable to suggest that the authors of a
    Stata 5 program should have made use of commands or concepts not then
    introduced."

    Maybe the authors benefit from my discussion of their contribution and
    edit
    their -program- accordingly. The current situation is confusing, and it
    took me some time and a longer session of -viewsource- to figure out the
    behavior reported by "New User".

    Nick Cox

    As Martin separately indicated, this program was published in STB-58 --
    in 2000 for Stata 5.

    As a reminder, all users -- new or not -- are asked in the FAQ to make
    clear where user-written programs they refer to come from. Otherwise
    quite what they are asking will be unclear to many and they reduce the
    chance of a reply that is prompt, clear, complete and correct.

    In this case, it is not reasonable to suggest that the authors of a
    Stata 5 program should have made use of commands or concepts not then
    introduced.

    -clad- was written for Stata 5 but evidently will work smoothly with
    later versions of Stata. The heavy lifting is all done by Stata's own
    -qreg- which is now eclass. Thus any stuff shown by -eret li- is
    returned not by -clad-, but by -qreg-.

    Users can use

    . viewsource clad.ado

    to see what is going on.

    Martin Weiss [expletive deleted]

    Look at -eret li- after estimation and ask yourself: Can this really
    come
    from -clad-? [...] The results saved there are from the last replication
    call to -qreg- as evident from e(cmdline). Specify the -saving- option
    to
    -clad-, let it run, type -eret li- and then -use- the file specified in
    -saving-, -list in l- and you see the result that still resides in e(b)
    and e(V). It makes me think the authors should have thrown in something
    like -eret clear-.

    New User/Bill

    I used clad command for the censored least absolute deviation
    estimation. After I ran clad, I intended to get coefficient and
    std.error estimates using e(b) and e(V). What surprised me was that
    the estimates in the report table and the values retrieved by e(V)
    were hugely different. Has any one ever met such problem?

    Comment

    Working...
    X