Arrange models in groups

For basic information on exporting tables to LaTeX, see here. The following example additionally illustrates how models can be grouped:

. sysuse auto, clear
(1978 Automobile Data)

. eststo: quietly reg weight mpg
(est1 stored)

. eststo: quietly reg weight mpg foreign
(est2 stored)

. eststo: quietly reg price weight mpg
(est3 stored)

. eststo: quietly reg price weight mpg foreign
(est4 stored)

. esttab using example.tex, booktabs label            ///
>     mgroups(A B, pattern(1 0 1 0)                   ///
>         prefix(\multicolumn{@span}{c}{) suffix(})   ///
>         span erepeat(\cmidrule(lr){@span}))         ///
>     alignment(D{.}{.}{-1}) page(dcolumn) nonumber
(output written to example.tex)

. eststo clear
Code

Result:

501.png