wiki/attachments/skills/event-study-plot/SKILL.md
生成学术论文级别的 event study 图。
npx skillsauth add luzhiyu-econ/luzhiyu-econ.github.io event-study-plotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
基于数据 $ARGUMENTS 生成 event study 图。
图表标准:
Python 实现使用 matplotlib,模板:
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.family'] = 'Times New Roman'
matplotlib.rcParams['font.size'] = 12
fig, ax = plt.subplots(figsize=(8, 5))
ax.axhline(y=0, color='black', linestyle='--', linewidth=0.8)
ax.axvline(x=-0.5, color='red', linestyle=':', linewidth=0.7)
ax.fill_between(periods, ci_lower, ci_upper, alpha=0.15, color='steelblue')
ax.plot(periods, coefficients, 'o-', color='steelblue', markersize=5)
ax.set_xlabel('Years relative to policy', fontsize=12)
ax.set_ylabel('Coefficient (ATT)', fontsize=12)
plt.tight_layout()
plt.savefig('output/figures/event_study.pdf', dpi=300, bbox_inches='tight')
plt.savefig('output/figures/event_study.png', dpi=300, bbox_inches='tight')
development
将 Stata .do 文件翻译为等效的 Python 脚本。
tools
构建完整的学术论文复制包(replication package)。
tools
对回归分析结果进行全面诊断。支持 DID、IV、RDD 三种方法。
research
生成学术论文的标准结构框架和 LaTeX 模板。