Skip to content

Guided R workflow for IV, DiD, and RDD analyses with fixest-based code and built-in diagnostics.

CCM score
57 of 100
skills.sh installs
349
GitHub stars
684
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full analysis flow: research-design intake, model code generation, output structure, and documentation of choices
  • Includes IV first-stage F-statistics, DiD parallel-trends and event-study plots, and RDD bandwidth and density tests
  • Enforces clustered standard errors, prefers feols over lm for panel data, and flags TWFE pitfalls with staggered treatment
  • Designed for economists producing publication-ready regression tables with modelsummary and etable

Install

$ npx -y skills add meleantonio/awesome-econ-ai-stuff --skill r-econometrics -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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:

  1. What is your identification strategy? (IV, DiD, RDD, or simple regression)
  2. What is the unit of observation? (individual, firm, country-year, etc.)
  3. What fixed effects do you need? (entity, time, two-way)
  4. How should standard errors be clustered?

Step 2: Generate Analysis Code

Based on the research design, generate R code that:

Details

Repository
github.com/meleantonio/awesome-econ-ai-stuff
Categories
Data Science & Analytics, Research & Academic
First seen
Jun 3, 2026

Questions

What does the r-econometrics skill do?

The r-econometrics skill runs Instrumental Variables, Difference-in-Differences and Regression Discontinuity Design analyses in R with proper diagnostics. It generates publication-ready code that uses the fixest package and robust or clustered standard errors.

How do I install the r-econometrics skill?

Run npx -y skills add meleantonio/awesome-econ-ai-stuff --skill r-econometrics -y in a project. Once installed, r-econometrics asks about your identification strategy, unit of observation, fixed effects and clustering before it writes the R code.

What does r-econometrics need to run?

r-econometrics needs R 4.0 or later and the fixest, modelsummary, tidyverse and ggplot2 packages. Those can be installed in R with install.packages on fixest, modelsummary and tidyverse.

Who is the r-econometrics skill for?

r-econometrics is for economists who run causal inference and panel data analyses in R. It helps them build IV, DiD and RDD specifications with event studies and regression tables for publication.

More from meleantonio/awesome-econ-ai-stuff

All 9

Similar to R Econometrics

More Data Science & Analytics