benjann / estout

Stata module to make regression tables
http://repec.sowi.unibe.ch/stata/estout/index.html
MIT License
70 stars 17 forks source link

Markdown support? #22

Closed amichuda closed 3 years ago

amichuda commented 4 years ago

Hi,

I've been using your estout and esttab packages all throughout grad school, so thank you for the crazy good contribution. Alas, I've decided to go into another direction and use pandoc markdown now.

Are there any plans to support export of tables into markdown tables?

Thank you

benjann commented 3 years ago

Sorry for the slow answer. There is an undocumented option style(mmd) in estout that writes markdown-style tables. I added that very long time ago and totally forgot about it. Maybe it is useful to you. Example:

. sysuse auto, clear
. regress price weight foreign
. est sto m1
. regress price weight foreign mpg
. est sto m2
. estout m1 m2, style(mmd)
|              |           m1 |           m2 |
|              |            b |            b |
| ------------ | :----------: | :----------: |
| weight       |     3.320737 |     3.464706 |
| foreign      |     3637.001 |      3673.06 |
| mpg          |              |      21.8536 |
| _cons        |    -4942.844 |    -5853.696 |
benjann commented 3 years ago

The esttab command now has option md to generate Markdown formatted tables. See today's update.