Announcement

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

  • Esttab --- possible to remove header line or footer line individually?

    The output command esstab, which I generally use to output regression results to Latex, allows you to remove *both* header lines and footer lines (the line beneath the column titles, and the line above Observations/R2, respectively) with the option nolines. But occasionally I wish remove one and not the other, for particular formatting reasons.

    Does anyone know how to do this? I don't believe it's directly possible, but perhaps by eliminating both lines (using nolines) and then adding one back in?

    Thanks,
    Leah

  • #2
    Hi Leah,

    the great thing about -esttab- is that you can use any option of its low-level cousin -estout- to format your table as well; -esttab- is just a wrapper to ease the use of -estout-.

    Have a look at this:
    Code:
    sysuse auto.dta , clear
    quietly : eststo : regress price mpg weight i.rep78
    * only header rules:
    esttab . , nolines prehead(\hline) posthead(\hline) tex
    * only footer rules:
    esttab . , nolines prefoot(\hline) postfoot(\hline) tex
    // pretty rules with LaTeX's -booktabs- package instead of default \hline:
    * only header rules:
    esttab . , nolines prehead(\toprule) posthead(\midrule) booktabs
    * only footer rules:
    esttab . , nolines prefoot(\midrule) postfoot(\bottomrule) tex
    Regards
    Bela
    Last edited by Daniel Bela; 10 Nov 2017, 01:39. Reason: formatting

    Comment


    • #3
      Thank you so much! I just tried these options in my code, and they work perfectly. I had a suspicion that this sort of direct command was possible, but hadn't understood the estout manual well enough to try them. Now I realize how many things I can specify myself --- massively helpful. Thank you again!

      Comment

      Working...
      X