en un clic
stata-regression
// Run regression analyses in Stata with publication-ready output tables.
// Run regression analyses in Stata with publication-ready output tables.
Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.
Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review.
Implements the Spec-Driven Development lifecycle (Intent, Requirements, Design, Tasks, Build) for structured feature development. Use when the user wants to scaffold a new feature spec, generate EARS requirements, create a technical design, break work into tasks, or check spec status. Trigger on keywords: sdd, spec-driven, ears requirements, feature spec.
Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.
Run IV, DiD, and RDD analyses in R with proper diagnostics
Build and solve Walrasian general equilibrium models with theory derivations and Julia computation
| name | stata-regression |
| description | Run regression analyses in Stata with publication-ready output tables. |
| workflow_stage | analysis |
| compatibility | ["claude-code","cursor","codex","gemini-cli"] |
| author | Awesome Econ AI Community |
| version | 1.0.0 |
| tags | ["stata","regression","esttab","econometrics"] |
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