Announcement

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

  • In etable the label suboption of cstat does not appear to do anything?

    First of all I just want to say that the etable command is a wonderful addition to Stata.. I'm trying to label the coefficient, p-value, and confidence interval but nothing happens. I guess I was assuming a column would appear after the variable name Is there a workaround for this?

    Code:
    . sysuse auto
    (1978 automobile data)
    
    . qui regress price mpg foreign
    
    . est store e1
    
    . qui regress headroom mpg foreign rep78
    
    . est store e2
    
    . 
    . * start fresh and recode equations
    . etable, est(e1 e2) eqrecode(price = xb headroom = xb) ///
    >      cstat(_r_b, label("Beta")) cstat(_r_ci, cidelimiter("-") label("95% CI"))  cstat(_r_p, nformat(%5.3f) label("p-value") ) varlabel
    
    --------------------------------------------------------------
                                   price             headroom     
    --------------------------------------------------------------
    Mileage (mpg)                      -294.196             -0.049
                           [-405.242- -183.149] [-0.086-   -0.012]
                                          0.000              0.010
    Car origin                         1767.292             -0.495
                            [371.217- 3163.368] [-1.023-    0.034]
                                          0.014              0.066
    Repair record 1978                                       0.126
                                                [-0.114-    0.367]
                                                             0.299
    Intercept                         11905.415              3.763
                           [9595.164-14215.667]  [2.813-    4.712]
                                          0.000              0.000
    Number of observations                   74                 69
    --------------------------------------------------------------

  • #2
    (A bit late, but better than never!)

    The labels here are hidden by default. After running -etable-, you have to change the style. Then you can view the changes with -collect preview-.

    Code:
    . collect style header _r_b _r_ci _r_p, level(label)
    
    . collect preview
    
    --------------------------------------------------------------
                                   price             headroom     
    --------------------------------------------------------------
    Mileage (mpg)                                                 
      Beta                             -294.196             -0.049
      95% CI               [-405.242- -183.149] [-0.086-   -0.012]
      p-value                             0.000              0.010
    Car origin                                                    
      Beta                             1767.292             -0.495
      95% CI                [371.217- 3163.368] [-1.023-    0.034]
      p-value                             0.014              0.066
    Repair record 1978                                            
      Beta                                                   0.126
      95% CI                                    [-0.114-    0.367]
      p-value                                                0.299
    Intercept                                                     
      Beta                            11905.415              3.763
      95% CI               [9595.164-14215.667]  [2.813-    4.712]
      p-value                             0.000              0.000
    Number of observations                   74                 69
    --------------------------------------------------------------


    Comment

    Working...
    X