Announcement

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

  • Linebreaks in the mlabes Option for esttab.

    Hello,

    I have been looking for an answer in this forum for a long time now, but have not found a working solution.

    my question is actually very simple. I want to create a regression table with the esttab command and modify the titles of the columns using mlabes. However, the titles are relatively long and so I need to insert a line break to make them visible.

    How can I do this?


  • #2
    estout is from SSC (FAQ Advice #12). If you are creating LaTeX tables, see https://www.statalist.org/forums/for...tles-in-esttab. Also, if you have a maximum of 2 lines, see other suggestions further down that thread. The following solution is unconventional but may be able to give you what you want.

    Code:
    sysuse auto, clear
    regress mpg weight turn disp i.rep78
    esttab ., mlabel("`=char(13)'`=char(10)' A very very long label for outcome `=char(13)'`=char(10)' mileage and regressors weight, turn, `=char(13)'`=char(10)' displacement and repair record") noabbrev nobaselevels
    Res.:

    Code:
    . esttab ., mlabel("`=char(13)'`=char(10)' A very very long label for outcome `=char(13)'`=char(10)' mileage an
    > d regressors weight, turn, `=char(13)'`=char(10)' displacement and repair record") noabbrev nobaselevels
    
    ----------------------------
                          (1)  
                
     A very very long label for outcome
     mileage and regressors weight, turn,
     displacement and repair record  
    ----------------------------
    weight           -0.00543**
                      (-3.13)  
    
    turn               -0.187  
                      (-0.92)  
    
    displacement      0.00720  
                       (0.56)  
    
    2.rep78            -0.421  
                      (-0.15)  
    
    3.rep78            -0.754  
                      (-0.29)  
    
    4.rep78            -0.963  
                      (-0.36)  
    
    5.rep78             1.714  
                       (0.62)  
    
    _cons               44.13***
                       (6.67)  
    ----------------------------
    N                      69  
    ----------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    Last edited by Andrew Musau; 19 Feb 2023, 05:32.

    Comment

    Working...
    X