Announcement

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

  • Label model names with esttab

    Hello, I am trying to do something very straightforward: give a title to the names of my "models" with esttab (from SSC). See here:


    Code:
    clear
    sysuse auto
    mean mpg price trunk weight length 
    eststo, title("All")
    mean mpg price trunk weight length if foreign == 0
    eststo, title("Domestic")
    esttab, cell("b se") label
    
    ------------------------------------------------------------------------
                                  (1)                       (2)             
                                 Mean                      Mean             
                                    b           se            b           se
    ------------------------------------------------------------------------
    Mileage (mpg)             21.2973     .6725511     19.82692      .657777
    Price                    6165.257     342.8719     6072.423     429.4911
    Trunk space (.. ft.)     13.75676     .4972381        14.75     .5971747
    Weight (lbs.)            3019.459     90.34692     3317.115      96.4296
    Length (in.)             187.9324     2.588409     196.1346     2.779887
    ------------------------------------------------------------------------
    Observations                   74                        52             
    ------------------------------------------------------------------------
    I tried adding titles via this post: https://www.stata.com/statalist/arch.../msg01441.html but it does not seem to be working properly. What am I missing?

  • #2
    Apparently things have changed since the time of the post you referenced, from 14 years ago.

    The output of
    Code:
    help estab
    show us the current approach to making use of model titles.
    Code:
    . esttab, cell("b se") label mtitles
    
    ------------------------------------------------------------------------
                                  (1)                       (2)            
                                  All                  Domestic            
                                    b           se            b           se
    ------------------------------------------------------------------------
    Mileage (mpg)             21.2973     .6725511     19.82692      .657777
    Price                    6165.257     342.8719     6072.423     429.4911
    Trunk space (.. ft.)     13.75676     .4972381        14.75     .5971747
    Weight (lbs.)            3019.459     90.34692     3317.115      96.4296
    Length (in.)             187.9324     2.588409     196.1346     2.779887
    ------------------------------------------------------------------------
    Observations                   74                        52            
    ------------------------------------------------------------------------
    Last edited by William Lisowski; 24 Jul 2022, 10:54.

    Comment

    Working...
    X