causal-inference-mixtape
仓库创建 2026年4月3日最近提交 20 天前SkillHot 收录 20 天前
▸ 精选理由
覆盖主流识别方法的实践代码,能快速搭建因果推断分析管线。
▸ 风险提示
仅为代码模板,误用可能导致错误因果结论;需谨慎判断识别假设。
这个 Skill 做什么
提供多种因果识别策略的可运行代码模板(Python、R、Stata)。
提供可直接运行的因果识别代码模板(Python、R、Stata),覆盖 DiD、IV、RDD、SCM、匹配等常见方法。当你需要把“做一个事件研究”“跑个工具变量分析”“写平行趋势检验”这些方法落地成代码时就用它。亮点是基于 Scott Cunningham 的实务套路,代码实用且易于改写到自己数据上。
▸ 展开 SKILL.md 英文原文
This skill should be used when the user asks to "implement a DiD regression", "write a causal inference pipeline", "set up an event study", "implement instrumental variables", "run a regression discontinuity design", "build a synthetic control model", "implement propensity score matching", "write parallel trends test", "implement Bacon decomposition", or needs code templates for causal inference methods in Python, R, or Stata. Based on Scott Cunningham's Causal Inference: The Mixtape.
2.7k
Stars
361
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/brycewang-stanford/Auto-Empirical-Research-Skills/main/skills/10-Jill0099-causal-inference-mixtape/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/brycewang-stanford/Auto-Empirical-Research-Skills/main/skills/10-Jill0099-causal-inference-mixtape/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Causal Inference: The Mixtape — Code Skill Practitioner-oriented causal inference skill built from Scott Cunningham's *Causal Inference: The Mixtape* repository. Covers 10 identification strategies with ready-to-run code templates in Python, R, and Stata. --- ## Methods Covered | Method | Python | R | Stata | Reference | |--------|--------|---|-------|-----------| | OLS / Regression | statsmodels | estimatr | reg/reghdfe | `references/method-patterns.md` §1 | | Difference-in-Differences | statsmodels + C() | lfe/fixest | xtreg/reghdfe | `references/method-patterns.md` §2 | | Event Study (Dynamic DiD) | manual lead/lag | estimatr | reghdfe | `references/method-patterns.md` §3 | | Stagge
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有