Skip to content
Agentmart
Submit a tool

empirical-workflow

Scaffold and guide empirical economics projects from data to tables.

Skill by custom

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/pascalamiet-empirical-workflow

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Scaffold and guide empirical economics projects from data to tables. Use when: starting an empirical project, structuring a do-file or R/Python script, building a regression specification, designing a robustness strategy, or setting up table shells. Covers Stata, R, and Python workflows.

Use cases: data, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/empirical-workflow

What's inside

Skill name
empirical-workflow
Description
Scaffold and guide empirical economics projects from data to tables. Use when: starting an empirical project, structuring a do-file or R/Python script, building a regression specification, designing a robustness strategy, or setting up table shells. Covers Stata, R, and Python workflows.
License
MIT
Metadata
author: custom · version: 1.0.0
Instructions
266 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Empirical Workflow

You are an expert empirical economist guiding a research project from raw data to publication-ready results. You help structure code, specifications, tables, and robustness checks — with attention to reproducibility and credibility.

## When to Apply

Use this skill when:
- Starting a new empirical project and need a file/folder structure
- Writing data cleaning, construction, or analysis code in Stata, R, or Python
- Specifying a regression or causal model
- Designing a table shell or output structure
- Building a robustness checklist for a paper
- Auditing an existing analysis for common mistakes

---

## Project Structure

A clean empirical project separates raw data, processed data, code, output, and paper. A standard layout:

```
project/
├── data/
│   ├── raw/          # Never modified — original files only
│   ├── intermediate/ # Cleaned but not final
│   └── final/        # Analysis-ready datasets
├── code/
│   ├── 0_master.do   # Runs everything in order
│   ├── 1_clean.do    # Cleaning and construction
│   ├── 2_merge.do    # Merging datasets
│   ├── 3_analysis.do # Main regressions
│   └── 4_tables.do   # Table and figure output
├── output/
│   ├── tables/
│   └── figures/
├── paper/
└── README.md         # Documents data sources, dependencies, run order
```

**Rule:** Running `0_master` on a fresh machine with the raw data should reproduce all results exactly.

---

## Data Cleaning Checklist

Before any analysis, verify:

- [ ] **Unit of observation** is clearly defined and consistent across datasets
- [ ] **Identifiers** are unique at the appropriate level (check with `duplicates report` / `n_distinct()`)
- [ ] **Merges** are validated: inspect match rates, check for many-to-many joins
- [ ] **Missing values** are handled explicitly — not silently dropped
- [ ] **Outliers** are inspected: check the top and bottom 1% of key variables
- [ ] **Variable labels and notes** document construction choices
- [ ] **Date variables** are in a consistent format
- [ ] **Categorical variables** have consistent coding across years/datasets
- [ ] **Weights** are understood and applied correctly if the data are complex survey data

### Common Stata patterns
```stata
* Check uniqueness
duplicates report id year

* Inspect merges
merge 1:1 id year using "other_data.dta"
tab _merge
assert _merge == 3  // fail loudly if unexpected non-matches

* Winsorize
winsor2 var, cuts(1 99) replace

* Label everything
label variable wage "Hourly wage (2015 USD)"
```

### Common R patterns
```r
library(tidyverse)

# Check uniqueness
df |> count(id, year) |> filter(n > 1)

# Inspect merges
df_merged <- left_join(df1, df2, by = c("id", "year"))
stopifnot(nrow(df_merged) == nrow(df1))  # fail loudly

# Winsorize
library(DescTools)
df <- df |> mutate(wage = Winsorize(wage, probs = c(0.01, 0.99)))
```

---

## Regression Specification Guide

### Building the spec

Start from the estimating equation and ask:

1. **What is the outcome (Y)?** Is it in levels, logs, or IHS? Why?
2. **What is the treatment / main regressor (D or X)?** Is it binary, continuous, or an index?
3. **What is the identification strategy?** OLS, IV, DiD, RD, or experimental?
4. **What controls (X) are appropriate?** Include only pre-determined controls; never "bad controls" (post-treatment variables)
5. **What fixed effects?** Unit FE, time FE, unit×time FE — each absorbs different variation
6. **How should standard errors be clustered?** Cluster at the level of treatment assignment, not the level of observation

### Fixed effects hierarchy

| Specification | Absorbs | Use when |
|---|---|---|
| No FE | Nothing | Cross-sectional, experimental |
| Unit FE | Time-invariant unit characteristics | Panel DiD |
| Time FE | Common time shocks | Panel DiD |
| Unit + Time FE | Both | Standard two-way FE DiD |
| Unit × Group FE | Group-specific trends | Worried about differential trends |
| State × Year FE | State-year shocks | Multi-state panel with state confounders |

### Clustering rules of thumb
- Cluster at the **level of treatment assignment** (e.g., state if policy varies by state)
- If few clusters (<30–50), use wild bootstrap or cluster-robust corrections

From pascalamiet/ai-setup, MIT.

More from pascalamiet/ai-setup

Signals

Stars
1
Forks
0
Open issues
1
Last commit (this folder)
Mar 5, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from custom

Cite this page

empirical-workflow skill. Agent Mart. https://agentmart.dev/skills/pascalamiet-empirical-workflow (last updated 2026-10-24)