# stata

A Stata reference that Claude opens while you write, debug or explain .do files, from data cleaning to reghdfe and Mata.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 240 repo stars
- Author: franklee16
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/franklee16/academic-research-skills/tree/HEAD/data-analysis/stata/SKILL.md
- Updated: 2026-09-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/franklee16-stata

## What it does

The skill gives Claude a set of Stata reference documents. Ask for a `.do` file and the matching ones come up: import and cleaning, descriptive statistics, regression, panel and time-series models, `logit`/`probit`/`tobit`, causal effects, Mata, graphics, export to Excel and Word. Community packages have their own sections, `reghdfe` and `estout` among them.

\`SKILL.md` is an index with a routing table. 1–3 files per task, not the whole library. The same file spells out the traps: missing values sorting above every number, `=` where `==` belongs, an unclosed local macro quote, `by` on unsorted data, a categorical variable left continuous without `i.`, an uninspected `_merge` after a merge, and weight types that do not swap.

Routing reads the phrasing of your request. Naming the command and the variables gets the right reference; a broad question does not.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill stata -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/stata/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/stata/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill stata -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/stata/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill stata -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/stata/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install franklee16/academic-research-skills data-analysis/stata/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/stata/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill stata -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/franklee16/academic-research-skills --path data-analysis/stata
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/stata/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/franklee16/academic-research-skills/tree/HEAD/data-analysis/stata/SKILL.md

## When to use it
- write a `.do` file that merges and reshapes without breaking variable names
- find out why missing values slipped into `if income > 50000`
- build a regression table with `esttab` and export it to Word
- fit a fixed-effects panel model with `reghdfe` and run a Hausman test
- move a slow loop into Mata

## Example prompts
- Write a `.do` file that loads the panel, runs `xtset id year` and fits a fixed-effects model with `reghdfe`.
- Why do missing values show up in `list if age > 60`, and how do I exclude them?
- Turn these regressions into an `esttab` table and export it to Word.

## Similar
- [stata-regression](https://affpapa.org/en/nevibecode/skills/stata-regression.md) — skill · 430 installs
- [stata-mcp](https://affpapa.org/en/nevibecode/mcp/stata-mcp.md) — MCP server · ★ 281 repo stars
- [stata-data-cleaning](https://affpapa.org/en/nevibecode/skills/stata-data-cleaning.md) — skill · 359 installs
- [stata-replication](https://affpapa.org/en/nevibecode/skills/stata-replication.md) — skill · ★ 1729 repo stars
- [r-empirical-finance](https://affpapa.org/en/nevibecode/skills/r-empirical-finance.md) — skill · ★ 165 repo stars
- [model-selection](https://affpapa.org/en/nevibecode/skills/model-selection.md) — skill · ★ 89 repo stars

## Other versions with the same name
- [stata · franklee16](https://affpapa.org/en/nevibecode/skills/stata.md) — ★ 240 repo stars

From the same set: [franklee16/academic-research-skills](https://affpapa.org/en/nevibecode/by/franklee16/academic-research-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
