Stata Regression
SkillDev toolsRun regression analyses in Stata with publication-ready output tables.
Use Stata Regression in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Stata Regression and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Stata Regression skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by brycewang-stanford/auto-empirical-research-skills in skills/09-meleantonio-awesome-econ-ai-stuff/_skills/analysis/stata-regression/SKILL.md and read by Ahel’s review.
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:
- Explain what each model estimates
- Highlight assumptions and diagnostics
- Suggest robustness checks or alternative models
Example Prompts
- "Run OLS with firm and year fixed effects, clustering by firm"
- "Estimate a logit model and export results to LaTeX"
- "Create a regression table with three specifications"
Example Output
* ============================================
* Regression Analysis with Stata
* ============================================
* Load data
use "data.dta", clear
* Summary stats
summarize y x1 x2 x3
* Main regression with clustered SEs
regress y x1 x2 x3, vce(cluster firm_id)
eststo model1
* Alternative specification with fixed effects
reghdfe y x1 x2 x3, absorb(firm_id year) vce(cluster firm_id)
eststo model2
* Export table
esttab model1 model2 using "results/regression_table.tex", replace se label
Requirements
Software
- Stata 17+
Packages
estout(foresttab)reghdfe(optional, for high-dimensional fixed effects)
Install with:
ssc install estout
ssc install reghdfe
Best Practices
- Match standard errors to the design (cluster where treatment varies)
- Report all model variants used in the analysis
- Document variable definitions and transformations
Common Pitfalls
- Not clustering standard errors at the correct level
- Omitting fixed effects when required by the design
- Exporting tables without clear labels and notes
References
Changelog
v1.0.0
- Initial release
Signals
- GitHub stars
- 5k
- Forks
- 536
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
stata-regression- Source
- github.com/brycewang-stanford/auto-empirical-research-skills
github.com/brycewang-stanford/auto-empirical-research-skills
Related picks
Skill · anthropics
The pick for Excelaai-excel
Skill · aai-labs
The pick for Excellatex-posters
Skill · k-dense-ai
The pick for LaTeXlatex-drawing-guide
Skill · brycewang-stanford
The pick for LaTeXgolden-pdf-ch
Skill · yusufkaraaslan
The pick for PDFpdf-co-automation
Skill · composio-community
The pick for PDF