Workflow
2026-02-188 min read

Publication-Ready Tables in Stata: esttab, outreg2, and collect

Stop manually formatting regression tables. Here's how to produce camera-ready LaTeX and Word tables from Stata using esttab, outreg2, and the new collect framework.

Sytra Team
Research Engineering Team, Sytra AI

You have six regression models. You need a publication-ready table with stars, standard errors, model comparisons, and formatted headers. In LaTeX. And Word, for co-authors who refuse to use LaTeX.

You have three options in Stata: esttab (the modern standard), outreg2 (the legacy option), and collect (Stata 17+’s new framework). Here’s when to use each.

esttab: The Standard

* Install estout package
ssc install estout, replace
 
* Run and store multiple models
regress y x1, vce(robust)
estimates store m1
regress y x1 x2, vce(robust)
estimates store m2
regress y x1 x2 x3, vce(robust)
estimates store m3
 
* Export LaTeX table
esttab m1 m2 m3 using table.tex, replace ///
se star(* 0.10 ** 0.05 *** 0.01) ///
booktabs label nomtitle ///
title("Main Results") ///
stats(N r2, labels("Observations" "\$R^2\$"))

Key options:

  • replace — overwrites existing file (essential for reproducibility)
  • se — reports standard errors below coefficients (vs. t for t-statistics)
  • booktabs — uses LaTeX booktabs package for clean horizontal rules
  • label — uses variable labels instead of names
  • stats() — adds summary statistics rows at the bottom

Word/RTF Output

esttab m1 m2 m3 using table.rtf, replace ///
se star(* 0.10 ** 0.05 *** 0.01) ///
label nomtitle

Stop fighting with syntax.

Sytra is an AI research assistant built specifically for statistical computing. No more copy-pasting code into ChatGPT.

Get Early Access

outreg2: The Legacy Option

ssc install outreg2, replace
 
regress y x1, vce(robust)
outreg2 using table, replace tex se bdec(3) sdec(3)
 
regress y x1 x2, vce(robust)
outreg2 using table, append tex se

outreg2 appends results model-by-model instead of storing them first. It works but produces less customizable output than esttab. It’s still widely used because many professors learned it first.

collect: Stata 17+

* Stata 17+ table collection framework
collect clear
quietly regress y x1 x2, vce(robust)
collect get, name(main)
collect layout (colname) (result)
collect export table.docx, replace

The collect framework is Stata’s official modern approach. It’s powerful and flexible but has a steeper learning curve than esttab. For most users, esttab remains the faster path to a publication table.

Pro Tips

  • Add custom rows: Use indicate() to show which FE are included: indicate("Firm FE=1.firm" "Year FE=1.year")
  • Fragment mode: Use fragment when embedding in a larger LaTeX document that already has tabular environment.
  • Coefficient map: Use order() and keep() to control which variables appear and in what order.
  • Regression table automation: Write a loop that runs all specifications and stores estimates, then call esttab once at the end. This ensures your table is always regenerable from code.
#Stata#LaTeX#Workflow#Reproducibility

Enjoyed this article?