Member-only story
The Stata-to-LaTeX guide
Last updated: 04 June 2023. The guide is now compatible with TeX 2022 compilers and fully utilizes the native estout package options to generate the tables without additional customizations in LaTeX.
In this guide, we will learn how to export Stata tables and regressions to LaTeX. This guide is updated intermittently to keep up with changes to the syntax, TeX compilers, and user requests.
The aim of this guide is not to discuss user-written commands, like esttab
or tabout
, but provide a replicable set of templates for applications. I myself use this guide all the time. Furthermore, this guide is not intended to be an introduction to regression analysis or a tutorial on LaTeX. Instead, it is aimed at users who are already familiar with both and would prefer not to spend hours searching bits and pieces of code online.
The LaTeX part is provided in a shared Overleaf document that can be viewed online. Users can either duplicate the template, or download the source code and locally compile the files. The document also contains a change log which tracks updates to this guide.
In order to follow the guide, the Stata part is discussed here for each table and the LaTeX code can be viewed on Overleaf. Tables generate in Stata are referenced with the same table number in the Overleaf, for example, Table exported as table1.tex will be…