Data Analysis Pipeline
Generate, execute, and verify analysis scripts across R, Python, Stata, and Julia.
Modes
| Mode | What it does | Phases |
|------|-------------|--------|
| EDA | Exploratory data analysis only | 1–2 |
| Estimation | Estimation + publication output (requires locked design) | 1, 3–4 |
| Full | Complete pipeline | 1–5 |
Default: Full. Detect mode from user request or ask if ambiguous.
When to Use
- "Analyse this data" / "Run EDA on this CSV" / "Estimate the model"
- "Generate results tables" / "Create publication figures"
- Any task requiring data → script → output pipeline
When NOT to Use
- Experimental design or power analysis →
experiment-design - Generating synthetic data for testing →
synthetic-data - Auditing identification strategy →
causal-design - Proofreading or compiling the paper →
proofread,latex
Shared References
- Method probing questions:
shared/method-probing-questions.md— ask before running any analysis - Validation tiers:
shared/validation-tiers.md— declare tier before examining results - Escalation protocol:
shared/escalation-protocol.md— escalate when methodology answers are vague - Distribution diagnostics:
shared/distribution-diagnostics.md— mandatory DV checks before model selection - Engagement-stratified sampling:
shared/engagement-stratified-sampling.md— stratify by engagement tiers for social media data - Inter-coder reliability:
shared/intercoder-reliability.md— per-category reliability for content analysis and LLM annotation
Workflow
Phase 1: Setup
- Detect project structure: Read
CLAUDE.md, check fordata/,code/,paper/directories. - Detect language: Check existing scripts, user preference, or ask. Read
shared/multi-language-conventions.mdfor the chosen language's conventions. - Locate data: Find datasets in
data/raw/ordata/processed/. Never modifydata/raw/(perdata-sensitivityrule). For social-media datasets, follow