Announcement

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

  • Labels in estout / esttab

    Hi,
    I am trying to construct a table by stacking stored -tabstat- tables using -estpost- command.
    I am doing so because I want to display rows of stats for several variables in groups that are not mutually excludable.
    So far, my code reads like this

    local colvars X1 X2 X3 X4 X5 X6

    estpost tabstat `colvars' , s(mean p50 sd) columns(v) by(laborstate) nototal

    esttab . using "tab1.tex", cells("`colvars'") replace noobs

    estpost tabstat `colvars' , s(mean p50 sd) columns(v) by(educgroup) nototal

    esttab . using "tab1.tex", cells("`colvars'") append noobs

    estpost tabstat `colvars' , s(mean p50 sd) columns(v) by(region)

    esttab . using "tab1.tex", cells("`colvars'") append


    Problem 1: Each categorical variable laborstate, educgroup, region take a set of discrete values that are labeled. However, in this example, the value of the categorical is listed at the left extreme of each row, so I cannot include labels in the table. How can I do so?

    Problem 2: The table I get lists the variable names as headings of each column (X1, X2,...,X6), instead of the labels for those variables. How can I include these labels in the table?

    Is my approach correct here? Is there any other wayto do this?

    I'd appreciate your help a lot

    Best
    Last edited by Benjamin Villena; 26 Mar 2016, 22:02.

  • #2
    I'd appreciate your help in this matter

    Comment


    • #3
      Problem 1: Add the esttab option eqlabels(`e(labels)')
      Problem 2: This is a deficiency of tabstat, and I am not aware of any straightforward solution

      Comment


      • #4
        Thank you Nils, your solution for problem 1 works fine.

        I hope someone comes up with a solution for problem 2.

        Best

        Comment


        • #5
          By the way, collabels("X1_label" ... "X6_label" ) in the first esttab, and collabels(none) in the second and third solved Problem 2. If anyone wants to share another solution, please let me know.

          Comment

          Working...
          X