Stata Package

Format publication-ready tables directly from Stata — no copy-pasting needed.

Requirements

  • Stata 16.0 or newer (requires Python integration)
  • Python 3.8+ configured in Stata
  • Internet connection
  • A tables.pub account with an API key

Installation

Install from GitHub:

net install statatable, from("https://raw.githubusercontent.com/thomasjanlaurens-hash/statatable-stata/main") replace

This installs statatable.ado, statatable_setup.ado, and statatable_core.py to your ado/plus directory.

Setup

1. Generate an API key on your dashboard.

2. Configure the key in Stata (one-time):

statatable_setup, key(sk_live_your_key_here)

Single Model

Run any estimation command, then call statatable:

sysuse auto, clear regress price mpg weight foreign statatable

Save to file with a title:

statatable, save(table1) title(Determinants of Car Prices)

Multiple Models

Combine multiple regressions into one table using Stata's built-in estimates store:

sysuse auto, clear * Run regressions and store each one regress price mpg weight estimates store m1 regress price mpg weight foreign estimates store m2 regress price mpg weight foreign trunk estimates store m3 * Combine into one table statatable m1 m2 m3, title(Price Regressions) save(table1)

Each model becomes a column in the table. Variables not present in a model show as empty cells. All standard statistics (N, R-squared, etc.) are included per model.

Options

OptionDescription
title(string)Table title
save(filename)Save LaTeX to file (.tex appended automatically)
seShow standard errors (default)
tstatShow t-statistics instead of SEs
pvalShow p-values
noconstantHide the constant row
eformExponentiate coefficients (odds ratios, IRR)
font(string)Font size: scriptsize, footnotesize, small, normalsize

Supported Commands

Works with any Stata estimation command that stores results in e():

regresslogitprobitivregressxtregxtlogitaregreg2suregheckmantobitpoissonnbregologitoprobitmlogit