MCPInstall

stata-regression

Run regression analyses in Stata with publication-ready output tables.

Installs
420
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/meleantonio/awesome-econ-ai-stuff --skill stata-regression
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads stata-regression automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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:

  1. Loads and checks the data - Handle missing values and verify variable types
  2. Runs the requested specification - Use regress, reghdfe, or xtreg as appropriate
  3. Adds robust or clustered standard errors - Match the study design
  4. Exports tables - Use esttab or outreg2 with 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 (for esttab)
  • reghdfe (optional, for high-dimensional fixed effects)

Install with:

ssc install estout
ssc install reghdfe

Best Practices

  1. Match standard errors to the design (cluster where treatment varies)
  2. Report all model variants used in the analysis
  3. 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

FAQ

What does the stata-regression skill do?

Run regression analyses in Stata with publication-ready output tables.

How do I install stata-regression?

Run npx skills add https://github.com/meleantonio/awesome-econ-ai-stuff --skill stata-regression in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/stata-regression/ (personal) or .claude/skills/stata-regression/ (project).

Which AI agents can use stata-regression?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is stata-regression safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains stata-regression?

It is published by meleantonio in meleantonio/awesome-econ-ai-stuff. It has 420 recorded installs.

More from meleantonio/awesome-econ-ai-stuff

View all →

academic-paper-writer

meleantonio/awesome-econ-ai-stuff

Draft economics papers with proper structure and academic style

stata-data-cleaning

meleantonio/awesome-econ-ai-stuff

Clean and transform messy data in Stata with reproducible workflows

351 installs

r-econometrics

meleantonio/awesome-econ-ai-stuff

Open the skill to read its SKILL.md instructions.

332 installs

beamer-presentation

meleantonio/awesome-econ-ai-stuff

Create academic presentations in Beamer with professional themes

Docs & Writing278 installs

lit-review-assistant

meleantonio/awesome-econ-ai-stuff

Open the skill to read its SKILL.md instructions.

api-data-fetcher

meleantonio/awesome-econ-ai-stuff

Open the skill to read its SKILL.md instructions.

Backend & APIs205 installs

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs