bybrycewang-stanford· 161 skills
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 progressive controls/FE) as the centerpiece, plus Table 1 (descriptives), mechanism / heterogeneity / robustness tables, and event-study + coefficient + trend figures. Covers the full 8-step R pipeline an applied economist runs on every paper — (1) data import & cleaning (read_dta/read_csv, naniar, janitor, validate-merges), (2) variable construction (mutate/across/winsorize/group_by + lag/lead with dplyr), (3) descriptive statistics & Table 1 (gtsummary, modelsummary::datasummary, tableone), (4) classical diagnostic tests (shapiro/jarque.bera.test/bptest/dwtest/bgtest/vif/adf.test/kpss.test/Hausman), (5) baseline modeling (fixest::feols, ivreg, did::att_gt, 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 tables & figures (modelsummary, kableExtra, gt, stargazer, texreg, flextable to LaTeX/Word/HTML; ggplot2 + ggpubr + cowplot + binsreg + iplot for figures). Also covers two parallel domain modes that share the same 8-step scaffolding — Mode A — Epidemiology / public health (target-trial emulation, IPTW + g-formula + TMLE doubly-robust triplet via WeightIt / gfoRmula / tmle / ltmle, Mendelian randomization via MendelianRandomization / TwoSampleMR / MRPRESSO, KM / Cox / AFT / RMST survival via survival / survminer / flexsurv, E-value sensitivity via EValue, principal stratification — STROBE / TRIPOD reporting), and Mode B — ML causal inference (DML via DoubleML, S/T/X/R/DR meta-learners via causalweight / grf, causal forest via grf::causal_forest, BART/BCF via bartCause / bcf, matrix completion via MCPanel, CATE distribution + policy tree via policytree, off-policy evaluation, conformal causal via conformalInference / cfcausal, fairness audit via fairmodels, DAG learning via pcalg / bnlearn / LLM-assisted). Use when the user asks for a complete R empirical analysis, wants a tidyverse-style reproducible R script / Quarto workflow, prefers fixest over reghdfe, needs the R counterpart to StatsPAI / 00.1 / 00.2, or names a specific R step in isolation ("feols with cluster", "MatchIt nearest neighbor", "bacondecomp in R", "gtsummary table 1", "modelsummary to Word"). Mode A triggers on "target trial emulation R", "tmle ltmle", "MendelianRandomization", "TwoSampleMR", "MRPRESSO", "survival cox AFT", "STROBE R", "EValue R", "公共健康 R", "流行病学 R". Mode B triggers on "DoubleML R", "grf causal forest", "policytree", "bartCause bcf", "conformal causal R", "fairmodels", "pcalg NOTEARS", "因果机器学习 R".
$npx -y skills add brycewang-stanford/auto-empirical-research-skills --skill 00.3-Full-empirical-analysis-skill_RInstalls into the current project.
Run `npx skills use "https://github.com/brycewang-stanford/auto-empirical-research-skills" --skill "brycewang-stanford/auto-empirical-research-skills/00.3-full-empirical-analysis-skill_r"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/brycewang-stanford/auto-empirical-research-skills" that are relevant to the current task. Run `npx skills add "https://github.com/brycewang-stanford/auto-empirical-research-skills"` and select the relevant skills, then follow their instructions.