科研 Skill
中国情境因果推断方法
mgmt-paper-causal-methods
提供DiD/RDD/IV/合成控制/PSM识别策略的Stata/R/Python模板,附中国数据陷阱。适用于CSMAR/Wind/CFPS数据的因果识别。
SKILL.md
MGMT - Paper - Causal Methods — 中国情境因果推断方法集
本 Skill 为面向中文情境(中国数据、中国政策评估)的研究助手,覆盖 5 种核心因果识别策略,给出 Stata / R / Python 三语言模板代码,以及中国数据/政策研究中的常见陷阱与稳健性套路。
What it does
- 给出 5 种主流因果识别方法的标准做法 (overview)
- 每种方法配 Stata / R / Python 三套可直接复用模板 (~20–40 行)
- 涵盖标准稳健性扩展(平行趋势、带宽敏感性、弱工具检验、安慰剂等)
- 中国情境补丁:CSMAR/Wind/CFPS/CHFS 数据特点、行政区划匹配、政策外生性回应
Methods covered
| 方法 | 缩写 | 文件夹 | 关键场景 |
|---|---|---|---|
| 双重差分 | DiD | methods/did/ | 政策时点冲击、面板数据 |
| 断点回归 | RDD | methods/rdd/ | 阈值规则(分数线/年龄线/行政线) |
| 工具变量 | IV | methods/iv/ | 内生性、反向因果 |
| 合成控制 | SC | methods/sc/ | 单一处理单位(一省/一市/一国) |
| 倾向得分匹配 | PSM | methods/psm/ | 横截面选择性偏误 |
Trigger phrases
中文:因果推断、识别策略、双重差分、DID、平行趋势、断点回归、RDD、工具变量、IV、合成控制法、SCM、倾向得分匹配、PSM、政策评估、政策冲击。
English: causal inference, DiD, RDD, IV, synthetic control, propensity score matching, identification, parallel trends, first stage, weak IV, bandwidth.
How to use this Skill
- 确定方法:先读
methods/<方法>/overview.md,确认假设是否成立。 - 挑语言:根据用户工作流读
stata.md/r.md/python.md中的对应模板。 - 过中国情境关:套用
cases/cn-context.md中的检查项(行政区划、数据库特点)。 - 跑稳健性:按
cases/robustness-checklist.md至少跑 3 项稳健性。 - 政策评估:参考
cases/policy-evaluation.md的 SOP 应用到具体政策。
File map
SKILL.md (this file)
methods/
did/ {overview, stata, r, python}.md
rdd/ {overview, stata, r, python}.md
iv/ {overview, stata, r, python}.md
sc/ {overview, stata, r, python}.md
psm/ {overview, stata, r, python}.md
cases/
cn-context.md 中国数据/区划/包生态
policy-evaluation.md 政策评估 SOP + 假想例
robustness-checklist.md 稳健性清单
Source & attribution
本 Skill 完全独立编写。方法学叙述参考公开教材:Angrist & Pischke (2009) Mostly Harmless Econometrics、Wooldridge (2010) Econometric Analysis of Cross Section and Panel Data、Cunningham Causal Inference: The Mixtape (https://mixtape.scunning.com/);代码模板参考各包的公开文档(`reghdfe`, csdid, rdrobust, fixest, did, MatchIt, linearmodels, DoubleML, Synth, gsynth 等)。
仓库 Jill0099/causal-inference-mixtape 提供了组织结构上的概念灵感(仅 README 高层结构),未复制其文本或代码。
License
Apache 2.0. See LICENSE and NOTICE.
示例提示词
我想用CSMAR数据做DiD政策评估,需要Stata模板和稳健性检验思路。
所属插件
安装该插件会一并获得同领域的 40 个 Skill / MCP。
同插件的其他科研 Skill
- 文献计量分析Runs bibliometric and co-citation analysis for management or economics literature reviews using CiteSpace, VOSviewer, or bibliometrix. Use for citation-network mapping.
- 发展经济学与RCT分析Loads LSMS data and runs RCT ITT analysis, Lee sharp bounds, covariate balance tables, propensity-score matching, and FGT poverty indices. Use for development-economics impact or poverty research.
- 双重差分因果推断Estimates DiD effects with two-way fixed effects, parallel-trends tests, Callaway-Sant’Anna staggered estimators, and Goodman-Bacon decomposition. Use for staggered or two-period DiD designs.
- 宏观经济预测Runs ARIMA, VAR, LightGBM ensemble forecasting, Diebold-Mariano tests, fan charts, and real-time ALFRED data. Use for macroeconomic forecasting or forecast-accuracy comparison.
- 金融事件研究法Estimates abnormal returns, CARs, BMP tests, and Fama-French normal returns plus long-run BHAR using yfinance. Use for a corporate-finance event-study around an announcement date.
- 实验经济学设计Designs incentivized lab, online, or lab-in-field experiments: treatment and payoff design, deception/IRB norms, and oTree/z-Tree setup. Use when designing a behavioral-economics study.
- 资产定价因子模型Fits Fama-French 3/5-factor, Carhart 4-factor, and q-factor asset-pricing models with rolling loadings and the GRS alpha test. Use for asset-pricing factor-model estimation.
- 金融时间序列分析Covers GARCH volatility modeling, cointegration, pairs trading, factor models, and risk decomposition for financial time series. Use for volatility or financial time-series research.
- 固定收益证券分析Covers bond pricing, yield curves, duration/convexity, Nelson-Siegel fitting, and credit-spread modeling. Use for fixed-income analytics or term-structure research.
- FRED宏观数据分析Fetches and analyzes FRED series via fredapi: GDP, unemployment, inflation, yield curves, recession shading, and HP filtering. Use for US macroeconomic time-series retrieval and analysis.
- 工具变量两阶段最小二乘Runs IV/2SLS with first-stage diagnostics, Wu-Hausman endogeneity, Sargan overidentification, and weak-instrument tests via linearmodels. Use for IV estimation of an endogenous regressor.
- 劳动经济学分析Estimates Mincer wage equations, Heckman selection, Oaxaca-Blinder decomposition, and unconditional quantile regression on CPS data. Use for labor-economics wage or selection research.
- 管理学实证研究图表為管理/財務實證研究產出出版級統計圖:轉折點圖、係數森林圖、交互作用圖、事件研究CAR曲線。用於迴歸或追蹤資料結果需要投稿圖表時。
- 经管学术图表模板集提供12种经管高频图表的Stata/R/Python三语言模板,支持4种期刊样式切换。适用于绘制经管学术图表、事件研究可视化或政策评估图。
- CSMAR数据清洗SOP提供CSMAR数据清洗SOP:ST剔除、缩尾标准、公司ID追踪、行业代码映射与时间对齐模板。适用于处理CSMAR数据或构建经管类面板数据。
- 研究流程与因果图绘制自动生成研究流程图、因果DAG、PRISMA图与网络图,提供Mermaid/Python/LaTeX TikZ模板。适用于绘制论文流程图或因果识别可视化。
- 科研资助申请书写作覆盖国内外主流科研资助项目的写作助手,提供项目对比、各模块写作提示与预算编制规范。适用于撰写国家社科基金、NSF、ERC等资助申请书。
- 管理学期刊投稿图表按目标期刊生成投稿级图表规格,强调矢量PDF、字体嵌入、色盲友好与可复现脚本。适用于准备特定期刊风格的图表或审查图表质量。
- 论文投稿材料整理覆盖论文材料盘点、证据矩阵、章节撰写与预投稿package整理,含cover letter与补充材料清单。适用于把研究项目整理成可投稿的完整论文包。
- 混合方法研究设计覆盖探索型/解释型顺序设计、并行汇聚设计、joint display与方法整合段落写作。适用于连接访谈/案例与问卷/实验数据的混合方法论文设计。
- 国自然基金申请书写作提供NSFC面上/青年/重点等8类项目的立项依据、研究内容、预算编制模板与退稿信号清单。适用于撰写、修改或审阅国家自然科学基金申请书。
- 论文项目进度管理提供论文项目的任务拆解、看板、里程碑、风险登记与周计划模板,适用于管理论文进度、协调合作者或安排修订冲刺与会议纪要整理。
- 中文期刊配图规范提供中文学术期刊配图规范与matplotlib模板:三线表、宋体字号、色盲友好调色板与7类常用图。适用于绘制符合中文期刊规范的学术图表。
- 管理学定性研究方法覆盖案例选择、访谈提纲、扎根理论、Gioia方法、编码本与NVivo/MAXQDA工作流。适用于设计、执行或写作管理学定性研究。
常见问题
中国情境因果推断方法能做什么?
提供DiD/RDD/IV/合成控制/PSM识别策略的Stata/R/Python模板,附中国数据陷阱。适用于CSMAR/Wind/CFPS数据的因果识别。
如何安装中国情境因果推断方法?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「中国情境因果推断方法」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
中国情境因果推断方法需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
中国情境因果推断方法经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。