data-analysis

Orchestrate reproducible Stata workflows from data loading to esttab and graph exports.

220|358|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill data-analysis-maxwell2732
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-analysis
Source: https://github.com/maxwell2732/codex-stata-for-economists/tree/main/.claude/skills/data-analysis
Command: npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill data-analysis-maxwell2732

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates fragile, non-reproducible Stata analysis by guiding you through a complete end-to-end workflow with consistent structure, logging, and publication-ready outputs.

Core Features & Use Cases

  • End-to-end Stata pipeline: loads raw data, performs EDA, constructs an analysis sample, estimates models, and exports tables and figures in a predictable directory layout.
  • Reproducibility with guardrails: enforces Stata coding conventions and econometric best practices, including controlled randomness, standardized paths, and log-based validation.
  • Publication-ready exports: generates tables to output/tables as .tex and .csv (via esttab) and figures to output/figures as .pdf and .png (via graph export), with review checkpoints (validate-log and stata-reviewer).

Example use case: You have a CPS-style dataset and want a fully logged workflow that loads data, explores key variables, builds an estimation sample, estimates OLS and IV specifications (or FE models as appropriate), and produces consistent regression tables and charts for a Quarto report.

Quick Start

Tell Codex to use the data-analysis skill to load your dataset from data/raw, run the full Stata workflow (EDA → construct sample → estimate models → export tables and figures) with logs and output artifacts saved under output/.

Frequently Asked Questions about data-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a reproducible Stata workflow with esttab tables and exported figures?

You build a reproducible Stata workflow by orchestrating data loading, EDA, sample construction, and model estimation to export esttab tables and graph-export figures with full logging. This ensures consistent directory layouts and validation checks.

What is the best way to structure an econometrics pipeline for OLS and IV models?

Structuring an econometrics pipeline for OLS and IV models requires staged do-files that separate data construction from estimation. This applies standardized paths and controlled randomness to generate publication-ready outputs reproducibly.

Can I export Stata regression results to .tex and .csv formats automatically?

Yes, you can export Stata regression results to .tex and .csv automatically using esttab. The workflow directs these publication-ready tables to an output directory while simultaneously exporting figures as .pdf and .png files.

Do I need specific Stata conventions to run reproducible analysis scripts?

Yes, running reproducible analysis scripts requires following specific Stata conventions and econometric best practices. The workflow uses provided wrapper scripts and staged do-files to validate outputs via reviewer and log checks.

Why does my Stata data analysis workflow lack reproducibility?

Your Stata data analysis workflow lacks reproducibility due to fragile, inconsistent structures without logging. Implementing an end-to-end pipeline with controlled randomness, standardized paths, and log-based validation eliminates this fragility.

How do I validate logged restrictions when building an analysis sample in Stata?

You validate logged restrictions when building an analysis sample in Stata by running data through controlled wrapper scripts. The workflow enforces standardized paths and applies log-based validation checks during the data construction stage.