Announcement

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

  • esttab: line breaks in column labels? get rid of summary stats? customized cells?

    hi all,

    i can not find any sign/command for a line break within column labels in a table. i found posts about line break for long commands in do files (http://www.stata.com/statalist/archi.../msg01049.html) and about line break for labels in graphs (http://www.stata.com/statalist/archi.../msg00068.html) . However this solution for the graph did not work in the table.

    Just to know the content: I'm comparing callback percentages to job adds between typical white and typical african american names (similar as the study: Bertrand M. and S. Mullainathan, 2004, "Are Emily and Greg More Employable than Lakisha and Jamal? A Field Experiment on Labor Market Discrimination\, The American Economic Review, Vol. 94, No. 4.)
    I need to create a table similar to the attached photo. A couple of things however don't work the way i want them to.

    so far i got the following table command:
    estpost ttest call_p call_c call_b call_f call_m, by(white)

    esttab , modelwidth(30) substitute(/ <br>) label cells("mu_1(fmt(2) label(Percent callback)) mu_2(fmt(2) label(Percent callback for)) mu_1/mu_2(label(Ratio)) b(label(Percent difference))" "N_1(fmt(0) label(for White names)) N_2(fmt(0) label(African-American names)) . p(fmt(4) label((p-value)))")

    those are my questions/the things that don't work:
    * how can i get rid of the summary statistics at the bottom (N is shown)?
    * how can i insert a line break within the column labels, my approach was to use the substitute command and exchange the "/" that is shown between the two labels of the cells in one column with a line break. <br> however does not work as line break here… any ideas how to insert a line break within a label in a table?
    (i found posts about line break for long commands in do files (http://www.stata.com/statalist/archi.../msg01049.html) and about line break for labels in graphs (http://www.stata.com/statalist/archi.../msg00068.html) . However this solution for the graph did not work in the table.)
    * in the third column i want to add the ratio, i.e. mu_1 divided by mu_2, just putting mu_1/mu_2 however does not work. any ideas how to include the ratio of the two means in this table?

    thanks and best regards, andrina

  • #2
    Dear Andrina,

    did you already find a solution for the line breaks in labels?
    At least it would help to know how to include non-breaking spaces in the value labels. Unfortunately `nbs' did'nt work.

    Best regards
    Sabine
    Last edited by Sabine Keller; 19 May 2017, 03:14.

    Comment

    Working...
    X