Install any skill in seconds. Free to start, no credit card required.
Get Started Free →LaTeX回归表格生成Skill。辅助生成符合AER/QJE等顶刊格式的三线表,包括标准误聚类标注、显著性星标、固定效应标注。触发词:LaTeX表格/回归表/三线表/table制作/latex table
.claude/skills/brycewang-stanford-latex-table/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 251% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-03 | ✓→✗ | ▼ Worse | 97% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 185% | 0% |
> 本 Skill 辅助生成符合经济学顶刊(AER, QJE, Econometrica, JPE)格式规范的 LaTeX 回归表格。涵盖:标准三线表、面板数据固定效应表、工具变量表、事件研究表。
顶刊表格的核心要素:
┌─────────────────────────────────────────────┐
│ 表头(表标题 + 注释信息) │
├─────────────────────────────────────────────┤
│ 列标签(列1 列2 列3) │
│ ────────────────────────────────────────── │ ← 第一道线(顶部)
│ 变量行(因变量、自变量、控制变量) │
│ ────────────────────────────────────────── │ ← 第二道线(列分隔)
│ 统计量行(N、R²、F、聚类标准误) │
├─────────────────────────────────────────────┤
│ 表底注释(显著性标注、数据来源、稳健性说明) │
└─────────────────────────────────────────────┘| 符号 | p值 | 说明 | |------|-----|------| | | p < 0.001 | 1% 显著性 | | | p < 0.01 | 5% 显著性 | | | p < 0.05 | 10% 显著性 | | † | p < 0.10 | 15% 显著性(部分期刊)|
⚠️ 注意:不同期刊对星标的数量和阈值要求不同,投稿前需确认目标期刊格式。
latex\begin{table}[htbp] \centering \caption{基准回归结果} \label{tab:baseline} \begin{threeparttable} \begin{tabular}{l*{3}{c}} \toprule & \multicolumn{3}{c}{因变量: log(GDP per capita)} \\ \cmidrule(l){2-4} & (1) & (2) & (3) \\ \midrule 互联网普及率 & 0.023*** & 0.018** & 0.015* \\ & (0.007) & (0.008) & (0.008) \\ 控制变量 & 否 & 是 & 是 \\ 固定效应 & 否 & 否 & 年份+国家\\ \midrule 观测值 & 1,240 & 1,240 & 1,240 \\ R² & 0.041 & 0.315 & 0.682 \\ \bottomrule \end{tabular} \begin{tablenotes} \item \textit{注:} ***, **, * 分别表示1\%, 5\%, 10\%的显著性水平。括号内为聚类标准误(聚类在国家层面)。控制变量包括:教育年限、人口增长率、贸易开放度。 \end{tablenotes} \end{threeparttable} \end{table}
latex\begin{table}[htbp] \centering \caption{固定效应模型估计结果} \label{tab:fe} \begin{threeparttable} \begin{tabular}{l*{4}{c}} \toprule & \multicolumn{2}{c}{OLS} & \multicolumn{2}{c}{固定效应} \\ \cmidrule(l){2-3} \cmidrule(l){4-5} & (1) & (2) & (3) & (4) \\ \midrule 技术扩散指数 & 0.035*** & 0.028** & 0.021* & 0.018* \\ & (0.009) & (0.010) & (0.011) & (0.010) \\ \midrule 国家固定效应 & \checkmark & \checkmark & \checkmark & \checkmark \\ 年份固定效应 & & \checkmark & & \checkmark \\ \midrule 观测值 & 1,240 & 1,240 & 1,240 & 1,240 \\ R² & 0.31 & 0.45 & 0.72 & 0.78 \\ \bottomrule \end{tabular} \begin{tablenotes} \item \textit{注:} 同上。固定效应模型使用双向聚类标准误(国家+年份)。 \end{tablenotes} \end{threeparttable} \end{table}
latex\begin{table}[htbp] \centering \caption{工具变量估计结果} \label{tab:iv} \begin{threeparttable} \begin{tabular}{l*{3}{c}} \toprule & OLS & \multicolumn{2}{c}{2SLS} \\ \cmidrule(l){2-2} \cmidrule(l){3-4} & (1) & (2) & (3) \\ \midrule 技术扩散指数 & 0.023*** & 0.041*** & 0.038*** \\ & (0.007) & (0.013) & (0.012) \\ \midrule KP F统计量 & & 24.6 & 28.3 \\ 弱工具变量检验 & & & \\ \midrule 观测值 & 1,240 & 1,240 & 1,240 \\ \bottomrule \end{tabular} \begin{tablenotes} \item \textit{注:} 列(2)-(3)使用技术扩散的滞后值作为工具变量。KP F统计量>10通过弱工具变量检验。 \end{tablenotes} \end{threeparttable} \end{table}
stata// 安装 estout 套件 ssc install estout, replace // 保存回归结果 eststo clear eststo: reg ln_gdp internet i.year, vce(cluster country) eststo: reg ln_gdp internet cov1 cov2 i.year, vce(cluster country) // 导出 LaTeX esttab using "tables/table1.tex", replace /// title("基准回归结果") /// label /// booktabs /// nonumbers /// mtitles("OLS" "OLS") /// star(* 0.05 ** 0.01 *** 0.001) /// se /// r2 /// addn("控制变量包括教育年限、人口增长率、贸易开放度。")
pythonimport pandas as pd from scipy.stats import ttest_ind # 使用 statsmodels 输出的 LaTeX 转换 from statsmodels.iolib.summary import summary_table # 回归后 result = model.fit() print(result.summary_latex())
| 要求 | 说明 | |------|------| | Threeparttable | 使用 \begin{threeparttable} 环境 | | booktabs | 使用 \toprule, \midrule, \bottomrule | | 字体 | 通常10pt,表的注释可9pt | | 列宽 | 使用 p{3cm} 控制列宽,或 tabularx 自动调整 | | 数字对齐 | 数字右对齐,变量名列左对齐 | | 缺失值 | 表格中用空白表示缺失,不写"NA" |
markdown## 表格输出规范 **输出路径**:tables/table{N}.tex **主子表规范**: - 主表(Main):表格1-3,放入正文 - 附录表(Appendix):表格A1-A10,放入Online Appendix **文件名规范**:
tables/table1_baseline.tex # 基准回归 tables/table2_heterogeneity.tex # 异质性分析 tables/tableA1_robustness_iv.tex # 附录:IV稳健性
**LaTeX 代码规范**:
- 表格必须可编译(无缺失 `}` 或 `{`)
- 所有特殊字符(%, &, #)需转义在 Claude Code 对话窗口输入:
/latex-table或完整 Prompt:
按LaTeX表格Skill生成符合AER顶刊格式的三线表回归结果,包括:基准回归表(表1)、固定效应表(表2)、工具变量表(表3)。使用booktabs环境,包含标准误聚类标注、显著性星标、固定效应标注。did-reviewer → DID 回归结果使用事件研究表格式R-optimizer → R 输出表格时的优化codebook-pass → 清洗后数据直接用于表格生成| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | pass→pass | 8,161 | 11,616 | +42% | 1 | 1 | 0% | 1,811 | 5,161 | +185% | 0 | 0 | — |
case-06 | fail→fail | 5,388 | 4,712 | -13% | 1 | 1 | 0% | 1,182 | 3,551 | +200% | 0 | 0 | — |
case-01 | pass→pass | 12,703 | 10,737 | -15% | 1 | 1 | 0% | 2,365 | 4,400 | +86% | 0 | 0 | — |
case-02 | pass→pass | 10,886 | 8,256 | -24% | 1 | 1 | 0% | 2,027 | 4,068 | +101% | 0 | 0 | — |
case-03 | pass→fail | 10,766 | 9,932 | -8% | 1 | 1 | 0% | 2,390 | 4,720 | +97% | 0 | 0 | — |
case-04 | fail→fail | 10,283 | 9,323 | -9% | 1 | 1 | 0% | 2,207 | 4,574 | +107% | 0 | 0 | — |
case-05 | pass→pass | 10,313 | 11,786 | +14% | 1 | 1 | 0% | 2,095 | 4,924 | +135% | 0 | 0 | — |
case-08 | fail→fail | 13,871 | 12,894 | -7% | 1 | 1 | 0% | 2,706 | 5,214 | +93% | 0 | 0 | — |
case-09 | fail→pass | 11,284 | 7,593 | -33% | 1 | 1 | 0% | 2,317 | 4,230 | +83% | 0 | 0 | — |
case-10 | pass→pass | 8,890 | 11,074 | +25% | 1 | 1 | 0% | 1,970 | 4,852 | +146% | 0 | 0 | — |
case-11 | fail→fail | 10,219 | 17,218 | +68% | 1 | 1 | 0% | 1,791 | 6,451 | +260% | 0 | 0 | — |
case-12 | pass→pass | 4,288 | 4,097 | -4% | 1 | 1 | 0% | 865 | 3,278 | +279% | 0 | 0 | — |
case-13 | pass→pass | 4,862 | 3,978 | -18% | 1 | 1 | 0% | 977 | 3,312 | +239% | 0 | 0 | — |
case-14 | pass→pass | 8,288 | 7,859 | -5% | 1 | 1 | 0% | 1,654 | 4,254 | +157% | 0 | 0 | — |
case-15 | pass→pass | 9,441 | 7,370 | -22% | 1 | 1 | 0% | 1,868 | 3,994 | +114% | 0 | 0 | — |
case-16 | pass→pass | 10,564 | 10,657 | +1% | 1 | 1 | 0% | 2,248 | 4,940 | +120% | 0 | 0 | — |
case-17 | fail→pass | 4,921 | 4,724 | -4% | 1 | 1 | 0% | 1,006 | 3,535 | +251% | 0 | 0 | — |
case-18 | pass→pass | 3,206 | 1,859 | -42% | 1 | 1 | 0% | 600 | 2,852 | +375% | 0 | 0 | — |
case-19 | fail→pass | 12,169 | 13,779 | +13% | 1 | 1 | 0% | 2,382 | 5,512 | +131% | 0 | 0 | — |
case-20 | pass→pass | 17,702 | 17,118 | -3% | 1 | 1 | 0% | 3,531 | 6,128 | +74% | 0 | 0 | — |
case-21 | pass→pass | 10,337 | 8,988 | -13% | 1 | 1 | 0% | 2,076 | 4,507 | +117% | 0 | 0 | — |
case-22 | pass→pass | 8,803 | 8,120 | -8% | 1 | 1 | 0% | 2,162 | 4,453 | +106% | 0 | 0 | — |
case-23 | pass→pass | 3,860 | 5,909 | +53% | 1 | 1 | 0% | 879 | 3,702 | +321% | 0 | 0 | — |
case-24 | pass→pass | 10,539 | 11,349 | +8% | 1 | 1 | 0% | 2,458 | 5,176 | +111% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +8 percentage points is the difference between those two pass rates over the 24 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.