Full-empirical-analysis-skill-R
适合使用 R 与 tidyverse 进行数据准备与计量分析的研究者。
需安装大量 R 包并准备运行环境。
基于 R tidyverse 与计量包的标准经验分析与论文级工作流。
把一篇经济学实证研究从数据到论文级输出串成完整 R 工作流,基于 tidyverse + fixest 等生态自动产出描述表、分组/异质性分析、政策评估和发表级回归表。适合做学术论文或政策报告的端到端分析,默认按 AER/QJE/AEJ 的风格生成多模型对照和可发表图表。亮点是把繁琐的标准化步骤模板化,省时又便于复现与投稿。
▸ 展开 SKILL.md 英文原文
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
帮我安装这个 skill:https://raw.githubusercontent.com/brycewang-stanford/Auto-Empirical-Research-Skills/main/skills/00.3-Full-empirical-analysis-skill_R/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/brycewang-stanford/Auto-Empirical-Research-Skills/main/skills/00.3-Full-empirical-analysis-skill_R/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 synthetic control, `MatchIt`/`WeightIt`/`cobalt`/`ebal` for matching, `grf`/`DoubleML` for ML causal, `mediation` for causal mediation, `marginaleffects` for post-estimation, `modelsummary`/`kableExtra`/`gt` for publication tables, `ggplot2`/`iplot`/`binsreg` for figures. **Companion skills**: this i