Agent skill · Workflow & Productivity

Full-empirical-analysis-skill-R

Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem — dplyr + tidyr + haven + fixest + sandwich + lmtest + clubSandwich + AER + ivreg + did + bacondecomp + HonestDiD + eventstudyr + rdrobust + rddensity + Synth + gsynth + synthdid + MatchIt + WeightIt + cobalt + ebal + grf + DoubleML + mediation + marginaleffects + modelsummary + kableExtra + gt + ggplot2 + ggpubr + cowplot + binsreg. **Defaults to economics empirical-paper style** (AER / QJE / AEJ) — every run produces a publication-ready output set with a multi-column regression table (M1→M6 pr

brycew6m878★ · +32/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill 00.3-Full-empirical-analysis-skill_R --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 10
SKILL.md size: 118 KB
Bundled scripts: none
Path: skills/00.3-Full-empirical-analysis-skill_R/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,244
Language: Stata
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 4, 2026

What it does

Covers an 8-step empirical analysis pipeline in R, leveraging tidyverse and econometrics packages to import/clean data, construct variables, produce descriptive statistics and Table 1, run baseline models (fixest::feols, ivreg, did, eventstudyr, synthdid, rdrobust, MatchIt, WeightIt, grf, DoubleML, mediation), perform robustness checks, extend analyses (interactions, marginal effects, mediation, gsem, dose-response splines, grf CATE), and generate publication-ready tables/figures. It emphasizes reproducible scripts with renv and Quarto, and outputs multi-table reports (T1–T5) plus figures (F1–F4).

How it works

The skill prescribes an 8-step workflow:

  1. Data import & cleaning using read_dta/read_csv and helpers; 2) Variable construction with mutate/across and lag/lead; 3) Descriptive statistics & Table 1 via gtsummary and modelsummary; 4) Classical diagnostic tests (shapiro, jarque.bera.test, bptest, dwtest, bgtest, vif, adf.test, kpss.test, Hausman); 5) Baseline modeling with fixest::feols and related methods (ivreg, did, eventstudyr, sun_ab, did_imputation, synthdid, rdrobust, MatchIt, WeightIt, grf::causal_forest, DoubleML, mediation); 6) Robustness battery (modelsummary stack, clubSandwich CRSE, fwildclusterboot, ri2, robomit Oster, bacondecomp, HonestDiD); 7) Further analysis (interactions, marginaleffects, mediation::mediate, gsem via lavaan, dose-response splines, grf CATE); 8) Publication-ready outputs via modelsummary, kableExtra, gt, stargazer, texreg, flextable and associated plotting via ggplot2, iplot, binsreg.

When to use it

Use when an applied economist wants a complete R-based empirical analysis pipeline yielding publication-ready results and tables, with the option to leverage modes for different domains (economics default; epidemiology and ML causal inference subsystems share the same steps but swap Step-5 estimators and Step-6/7 analyses).

What it can touch

The workflow touches data files read_dta/read_csv, variable construction and several modeling/diagnostic steps, and outputs to tables/figures (tables/table1_balance.xlsx, tables/table2_main.xlsx, figures/fig1_trend.png, etc.). It specifies usage of packages and functions such as feols, modelsummary, gtsummary, tbl_summary, sunab, ggdid, bacon, HonestDiD, rdrobust, MatchIt, WeightIt, cobalt, ebal, grf, DoubleML, mediation, marginaleffects, kableExtra, gt, stargazer, texreg, flextable, ggplot2.

Caveats

The description notes a license of NOASSERTION and relies on several external packages; specifics about licensing or risk are not itemized beyond that, and no outcomes are promised beyond the publication-ready outputs outlined (tables/figures).

From the SKILL.md

# Full Empirical Analysis — Classical R Workflow This skill is the *canonical* 8-step pipeline an applied economist runs on every empirical paper, written in the **modern tidyverse + econometrics R ecosystem** — `dplyr`/`tidyr`/`haven` for data, `fixest` as the panel/IV/DID workhorse, `did`/`bacondecomp`/`HonestDiD` for modern DID, `rdrobust`/`rddensity` for RD, `Synth`/`gsynth`/`synthdid` for syn

More from Auto-Empirical-Research-Skills
All skills →
About this skill
What does the Full-empirical-analysis-skill-R skill do?

Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem — dplyr + tidyr + haven + fixest + sandwich + lmtest + clubSandwich + AER + ivreg + did + bacondecomp + HonestDiD + eventstudyr + rdrobust + rddensity + Synth + gsynth + synthdid + MatchIt + WeightIt + cobalt + ebal + grf + DoubleML + mediation + marginaleffects + modelsummary + kableExtra + gt + ggplot2 + ggpubr + cowplot + binsreg. **Defaults to economics empirical-paper style** (AER / QJE / AEJ) — every run produces a publication-ready output set with a multi-column regression table (M1→M6 pr

How do I install it?

Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill 00.3-Full-empirical-analysis-skill_R --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going