Announcement

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

  • Problems with table formatting using estpost (correlate)

    Dear Stata users,

    I would like to create a correlation table using the "estpost corr" command.

    My problem refers to the table's column headers, as I cannot figure out how to change the variables' names in the table header. For the row names, I can use the option "varlabels" (see code below), but I couldn't find anything to change the column names, although I tried several options (mgroups, collabels).

    In fact, I would like to create a table in which the correlation of several variables is displayed and in which I can change the variable names, so that they are the same in the column (header) and in the rows.

    Below an extract of my do file using Stata's union.dta:

    *---------------------------------------------------------------------------------------------------*
    eststo clear
    use http://www.stata-press.com/data/r13/union.dta, clear

    eststo COR: estpost correlate age grade black union south, matrix

    esttab using Correlate_Union.tex, booktabs replace ///
    cells(b(fmt(3))) ///
    unstack not noobs compress ///
    nonumb nolabel nogaps nolines ///
    collabels(none) ///
    varlabels(age "Age" ///
    grade "Grade" ///
    union "Union" ///
    black "Black")
    eststo clear
    *---------------------------------------------------------------------------------------------------*


    Thanks for any advice!

    Catharina
Working...
X