Announcement

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

  • Etable display

    Hi all

    I am having problem with the last column display using etabl, this problem always with the last column.

    Code:
    webuse bangladesh
    
    logit c_use urban i.urban##i.child* 
    est store logit
    
    melogit c_use urban i.urban##i.child* || district:
    est store melogit
    
    xtmelogit c_use urban i.urban##i.child* || district:
    est store xtmelogit
    
    etable, column(index) estimates(logit melogit xtmelogit) mstat(N, nformat(%9.0g)) mstat(aic, nformat(%9.3f)) mstat(bic, nformat(%9.3f)) mstat(r2_p, nformat(%9.3f)) showstars export(testfile, as(docx) replace)
    
    
    -----------------------------------------------------------------------
                                             1           2           3     
    -----------------------------------------------------------------------
    Urban or rural                         1.064 **    0.973 **            
                                         (0.208)     (0.221)               
    1 child                                                                
      1                                    1.123 **    1.157 **            
                                         (0.189)     (0.195)               
    2 children                                                             
      1                                    1.235 **    1.275 **            
                                         (0.191)     (0.198)               
    3 or more children                                                     
      1                                    0.998 **    1.064 **            
                                         (0.162)     (0.168)               
    Urban or rural # 1 child                                               
      Urban # 1                           -0.375      -0.384               
                                         (0.311)     (0.321)               
    Urban or rural # 2 children                                            
      Urban # 1                           -0.409      -0.342               
                                         (0.335)     (0.346)               
    Urban or rural # 3 or more children                                    
      Urban # 1                           -0.363      -0.315               
                                         (0.268)     (0.277)               
    Intercept                             -1.494 **   -1.581 **            
                                         (0.136)     (0.155)               
    var(_cons[district])                               0.210               
                                                     (0.072)               
    Urban or rural                                                 0.973 **
                                                                 (0.221)   
    1 child                                                                
      1                                                            1.157 **
                                                                 (0.195)   
    2 children                                                             
      1                                                            1.275 **
                                                                 (0.198)   
    3 or more children                                                     
      1                                                            1.064 **
                                                                 (0.168)   
    Urban or rural # 1 child                                               
      Urban # 1                                                   -0.384   
                                                                 (0.321)   
    Urban or rural # 2 children                                            
      Urban # 1                                                   -0.342   
                                                                 (0.346)   
    Urban or rural # 3 or more children                                    
      Urban # 1                                                   -0.315   
                                                                 (0.277)   
    Intercept                                                     -1.581 **
                                                                 (0.155)   
    Intercept                                                     -0.780   
                                                                 (0.172)   
    Number of observations                  1934        1934        1934   
    AIC                                 2480.796    2441.273    2441.273   
    BIC                                 2525.334    2491.379    2491.379   
    Pseudo R-squared                       0.049                           
    -----------------------------------------------------------------------
    (collection ETable exported to file testfile.docx)

  • #2
    Code:
    etable, column(index) estimates(logit melogit xtmelogit) ///
        mstat(N, nformat(%9.0g)) mstat(aic, nformat(%9.3f)) ///
        mstat(bic, nformat(%9.3f)) mstat(r2_p, nformat(%9.3f)) ///
        showstars export(testfile, as(docx) replace) eqrecode(eq1 = c_use)
    does the trick. The problem is that for -logit- and -melogit-, the "equation name" is c_use, but for -xtmelogit- it's eq1. Because it has a different equation name, -etable- considers its variables to be different from those of the other two models. The -eqrecode()- option forces a rename of that equation within -etable-.

    If you are wondering how you can know what the equation names are, if you -matrix list e(b)- after any Stata estimation command, you will see it in the names of the columns of that matrix.

    Comment


    • #3
      Thanks Clyde Schechter!!

      Comment

      Working...
      X