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-code

Installs 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:

  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:

Sponsors

Details

Repository
github.com/meleantonio/awesome-econ-ai-stuff
Category
AI & Agent Building
First seen
Jun 3, 2026

More from meleantonio/awesome-econ-ai-stuff

All 9
1rstackjs avatarmigrate-to-rstestrstackjs/agent-skillsMigrate Jest or Vitest projects to Rstest. Use when asked to move from Jest/Vitest to Rstest, replace `jest`/`vi` APIs with `@rstest/core`, translate config int427skills.sh installs
2aj-geddes avatarcanary-deploymentaj-geddes/useful-ai-promptsImplement canary deployment strategies to gradually roll out new versions to subset of users with automatic rollback based on metrics.426skills.sh installs
3aj-geddes avatarservice-mesh-implementationaj-geddes/useful-ai-promptsImplement service mesh (Istio, Linkerd) for service-to-service communication, traffic management, security, and observability.426skills.sh installs
4aj-geddes avatarazure-functionsaj-geddes/useful-ai-promptsCreate serverless functions on Azure with triggers, bindings, authentication, and monitoring. Use for event-driven computing without managing infrastructure.424skills.sh installs
5aj-geddes avatardata-replication-setupaj-geddes/useful-ai-promptsSet up database replication for high availability and disaster recovery. Use when configuring master-slave replication, multi-master setups, or replication moni424skills.sh installs
6aj-geddes avatargraphql-implementationaj-geddes/useful-ai-promptsDesign and implement GraphQL APIs with schema design, resolvers, queries, mutations, subscriptions, and best practices. Use when building GraphQL servers, desig424skills.sh installs