Run IV, DiD, and RDD analyses in R with proper diagnostics
NewMaintained
Automatic
◆Data Analyst pack
Last verified 8/9/2026
What it changes
Passed 19 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill86%
0 fixed19 passed either way3 still failing0 broke
Pass-rate lift
0 pp
Tokens
+43%
Agent turns
0%
Response time
-10%
Model gemini-3.6-flashMeasured 8/9/2026v119 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
What's inside
The instructions your model reads when the skill loads.
SKILL.md182 linessingle file
R Econometrics
Purpose
This skill helps economists run rigorous econometric analyses in R, including Instrumental Variables (IV), Difference-in-Differences (DiD), and Regression Discontinuity Design (RDD). It generates publication-ready code with proper diagnostics and robust standard errors.
When to Use
Running causal inference analyses
Estimating treatment effects with panel data
Creating publication-ready regression tables
Implementing modern econometric methods (two-way fixed effects, event studies)
Instructions
Step 1: Understand the Research Design
Before generating code, ask the user:
What is your identification strategy? (IV, DiD, RDD, or simple regression)
What is the unit of observation? (individual, firm, country-year, etc.)
What fixed effects do you need? (entity, time, two-way)
How should standard errors be clustered?
Step 2: Generate Analysis Code
Based on the research design, generate R code that:
Uses the fixest package - Modern, fast, and feature-rich for panel data
Includes proper diagnostics:
For IV: First-stage F-statistics, weak instrument tests
For DiD: Parallel trends visualization, event study plots
For RDD: Bandwidth selection, density tests
Uses robust/clustered standard errors appropriate for the data structure
Creates publication-ready output using modelsummary or etable