
Stata Regression
This generates reproducible Stata regression code with proper standard errors and publication-ready tables using esttab or outreg2. It walks through the full workflow: asks about your dependent variable, controls, fixed effects, and clustering before writing code that loads data, runs the models (regress, reghdfe, or xtreg), and exports formatted tables for LaTeX or Word. The prompting structure is good because it forces you to specify clustering and fixed effects upfront, which prevents the usual mistakes of forgetting to cluster at the treatment level or omitting necessary absorb terms. Comes from the Awesome Econ AI Community, so it knows the academic workflow. Requires Stata 17+ and assumes you'll install estout and reghdfe from SSC.
- skills.sh installs
- 427
- GitHub stars
- 668
- last updated
- Aug 21, 2026
Install
$ npx -y skills add meleantonio/awesome-econ-ai-stuff --skill stata-regression --agent claude-codeInstalls into .claude/skills of the current project.
Files
Stata Regression
Purpose
This skill produces reproducible regression analysis workflows in Stata, including model diagnostics and publication-ready tables using esttab or outreg2.
When to Use
- Estimating linear or nonlinear regression models in Stata
- Producing tables for academic papers and reports
- Running robustness checks and alternative specifications
Instructions
Follow these steps to complete the task:
Step 1: Understand the Context
Before generating any code, ask the user:
- What is the dependent variable and key regressors?
- What controls and fixed effects are required?
- How should standard errors be clustered?
- What output format is needed (LaTeX, Word, or CSV)?
Step 2: Generate the Output
Based on the context, generate Stata code that:
- Loads and checks the data - Handle missing values and verify variable types
- Runs the requested specification - Use
regress,reghdfe, orxtregas appropriate - Adds robust or clustered standard errors - Match the study design
- Exports tables - Use
esttaboroutreg2with clear labels
Step 3: Verify and Explain
After generating output:
Sponsors
Details
- Repository
- github.com/meleantonio/awesome-econ-ai-stuff
- Category
- AI & Agent Building
- First seen
- Jun 3, 2026