skills/30-zirui-song-claude-skills/data-doc/SKILL.md
Document datasets, variables, sources, and merge keys for replication
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research data-docInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Help document datasets systematically for replication packages, co-author handoffs, and future reference.
When documenting a dataset, capture:
firm_year_panel.parquet)| Source | Access | Raw File | Notes |
|--------|--------|----------|-------|
| WRDS Compustat | Subscription | raw/compustat_funda.csv | Annual fundamentals |
| Revelio Labs | Licensed | raw/revelio_positions.parquet | Via BU server |
| Hand-collected | Manual | raw/manual_coding.xlsx | See coding protocol |
| Variable | Type | Description | Source | Notes |
|----------|------|-------------|--------|-------|
| gvkey | str | Compustat firm identifier | Compustat | Primary key |
| fyear | int | Fiscal year | Compustat | |
| at | float | Total assets ($ millions) | Compustat | Winsorized 1/99 |
| treated | int | =1 if treated firm | Constructed | See section 4 |
For constructed/derived variables, document:
Variable: treated
Definition: =1 if firm received first PE investment in year t
Construction:
1. Merge PitchBook deals to Compustat on EIN
2. Keep first deal per firm
3. Flag year of first investment
Script: 2a_construct_treatment.py, lines 45-78
Document all filters applied:
| Filter | Observations Dropped | Remaining | |--------|---------------------|-----------| | Raw data | - | 150,000 | | Drop financials (SIC 6000-6999) | 25,000 | 125,000 | | Require non-missing assets | 5,000 | 120,000 | | Require 2+ years in panel | 10,000 | 110,000 |
| Dataset A | Dataset B | Key(s) | Match Rate | Notes | |-----------|-----------|--------|------------|-------| | Compustat | CRSP | gvkey | 95% | Via CCM link table | | Compustat | PitchBook | EIN | 72% | Manual cleaning needed | | Revelio | Compustat | company_name | 68% | Fuzzy match, see script |
================================================================================
CODEBOOK: firm_year_panel.dta
Generated: 2026-01-15
================================================================================
IDENTIFICATION
gvkey Compustat permanent firm identifier
fyear Fiscal year
OUTCOME VARIABLES
roa Return on assets = ni/at (winsorized 1/99)
investment Capex/lagged assets = capx/L.at
TREATMENT VARIABLES
post =1 for years after treatment
treated =1 for firms ever treated
treat_post Interaction: treated × post (DiD coefficient)
CONTROLS
size Log total assets = ln(at)
leverage Book leverage = (dltt+dlc)/at
mtb Market-to-book = (prcc_f×csho)/ceq
FIXED EFFECTS
ff48 Fama-French 48 industry classification
state State of incorporation
================================================================================
Before finalizing a dataset, verify:
tools
Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".
tools
Autonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop llm" or "llm review".
tools
Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".
tools
Autonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop llm" or "llm review".