skills/31-thalysandratos-claude-code-skills/_skills/analysis/stata-regression/SKILL.md
Run regression analyses in Stata with publication-ready output tables.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research stata-regressionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill produces reproducible regression analysis workflows in Stata, including model diagnostics and publication-ready tables using esttab or outreg2.
Follow these steps to complete the task:
Before generating any code, ask the user:
Based on the context, generate Stata code that:
regress, reghdfe, or xtreg as appropriateesttab or outreg2 with clear labelsAfter generating 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
estout (for esttab)reghdfe (optional, for high-dimensional fixed effects)Install with:
ssc install estout
ssc install reghdfe
tools
Show mcp-stata identity, connected tools, and status. Use when the user asks if mcp-stata is available, asks about access to the toolkit, or asks what Stata tools are connected.
tools
Activate when users mention Stata commands, .do files, regressions, econometrics, stored results, graphs, dataset inspection, replication, or Stata errors. Route the task through mcp-stata tools and the specialized research skills instead of treating it as plain text coding.
development
Build and review paper-ready regression, balance, and summary tables from Stata outputs. Use when the user needs a clean table for a draft, appendix, or coauthor share-out.
tools
Install, configure, update, or verify mcp-stata across Claude Code, Codex, Gemini CLI, Cursor, Windsurf, and VS Code. Activate when users ask to set up the Stata toolkit or troubleshoot the installation.