fin-paper-plan · diff
v1 to v1
106 added, 0 removed. Audit B to B.
---
description: Generate structured paper outline adapted to target journal
trigger: "生成大纲|论文大纲|outline|结构设计|章节安排|章节结构"
version: 1.0
dependencies:
- FIN_BRIEF.md
- IDEA_REPORT.md
- REFINED_DESIGN.md
outputs:
- PAPER_OUTLINE.md
- FIGURE_PLAN.md
- TABLE_PLAN.md
tags:
- latex
- paper-writing
- outline
- fin-paper
---
# fin-paper-plan
> Generate a structured academic paper outline adapted to the target journal, including chapter word count targets, figure plan, and table plan.
## Step 0: Read Input Files
First, read any existing research briefs to extract the target journal and research type:
```bash
# Check for existing research files
ls -la output/fin-brief/
ls -la output/fin-ideas/
```
Read `FIN_BRIEF.md` (if exists) to extract:
- `target_journal`: 经济研究 / 金融研究 / 管理世界 / JF / JFE / RFS / JAE / etc.
- `language`: zh / en
- `research_type`: empirical / theoretical / empirical+theory
- `main_method`: DID / IV / RDD / PSM / Panel GMM / etc.
```python
import os
from pathlib import Path
brief_path = Path("output/fin-brief/FIN_BRIEF.md")
if brief_path.exists():
content = brief_path.read_text()
# Extract key fields with regex or simple parsing
# target_journal = extract_field(content, "target_journal")
# language = extract_field(content, "language")
```
## Step 1: Select Journal Template
Map the target journal to its formatting requirements:
| Journal | Format | Language | Word Count | Style |
|---------|--------|----------|------------|-------|
| 经济研究 | CTeX / LaTeX | 中文 | 10,000–15,000字 | Hypothesis-driven, CTeX |
| 金融研究 | CTeX / LaTeX | 中文 | 10,000–15,000字 | Empirical-focused, CTeX |
| 管理世界 | CTeX / LaTeX | 中文 | 8,000–12,000字 | Policy implications emphasized |
| 中国工业经济 | CTeX / LaTeX | 中文 | 10,000–15,000字 | Empirical + Policy |
| 会计研究 | CTeX / LaTeX | 中文 | 10,000–15,000字 | Empirical |
| 世界经济 | CTeX / LaTeX | 中文 | 10,000–15,000字 | Theory + Empirical |
| JF (Journal of Finance) | AEA LaTeX | English | 12,000–20,000 words | AEA style |
| JFE (Journal of Financial Economics) | JFE LaTeX | English | 12,000–20,000 words | JFE style |
| RFS (Review of Financial Studies) | RFS LaTeX | English | 12,000–20,000 words | RFS style |
| JAE (Journal of Accounting and Economics) | AEA LaTeX | English | 10,000–15,000 words | AEA style |
| JPE (Journal of Political Economy) | Chicago LaTeX | English | 12,000–20,000 words | Chicago |
| Econometrica | LaTeX | English | 12,000–20,000 words | Econometrica |
| AER (American Economic Review) | AEA LaTeX | English | 12,000–20,000 words | AEA style |
| Review of Economics and Statistics | LaTeX | English | 10,000–15,000 words | ReStud style |
| Journal of Development Economics | LaTeX | English | 10,000–15,000 words | JDE style |
```python
# Journal configuration dictionary
JOURNAL_CONFIG = {
"经济研究": {
"format": "ctex",
"language": "zh",
"word_count": "10,000–15,000",
"style": "hypothesis_driven",
"sections": ["引言", "文献综述", "理论分析", "研究假说", "数据与研究设计", "实证结果", "稳健性检验", "结论"],
"font": "SimHei",
"packages": ["ctex", "amsmath", "amssymb", "hyperref"],
"bib_style": "gbt-7714-2015",
},
"JF": {
"format": "aea",
"language": "en",
"word_count": "12,000–20,000",
"style": "aea",
"sections": ["Introduction", "Literature Review", "Hypotheses", "Data & Methodology", "Results", "Robustness", "Conclusion"],
"font": "Times New Roman",
"packages": ["aea", "amsmath", "amssymb", "hyperref"],
"bib_style": "aer",
},
# ... add all journals
}
```
## Step 2: Generate PAPER_OUTLINE.md
Create the full chapter structure with word count targets. Use the template below and adapt to the specific research type.
### Template for 实证研究 (经济研究 / 中文顶刊)
```markdown
# PAPER_OUTLINE.md
> Paper Outline — Generated by fin-paper-plan
> Target Journal: 经济研究
> Research Type: 实证研究 (Empirical)
> Language: 中文
> Version: v1.0
> Generated: 2026-01-01
---
## 总体字数目标
- 总字数: 10,000–15,000 字(不含参考文献)
- 表格字数: 约 1,500–2,500 字
- 图表字数: 约 1,000–1,500 字
- 正文字数: 约 7,000–11,000 字
---
## 章节结构
### 第1章 引言 (Introduction) — 1,500–2,000 字
**目标**: 吸引读者,说明研究问题、方法和贡献
**内容**:
1.1 研究背景与问题提出 (2段)
- 宏观/行业背景(1段)
- 现实问题引出研究问题(1段)
1.2 文献综述 (2–3段)
- 梳理相关领域已有研究
- 指出现有研究的不足
1.3 本文研究 (1段) ← **最重要段落**
- 用1段话概述:研究了什么问题、用了什么数据、采用什么方法、主要发现是什么
- 格式建议:[研究背景]→[研究问题]→[数据与方法]→[核心发现]
1.4 研究假说 H1/H2/H3 (1–2段)
- 简要列出待检验的假说
1.5 边际贡献 (3–5点)
- 理论贡献
- 实证贡献
- 政策贡献
1.6 论文结构 (1段)
- 后续章节安排
---
### 第2章 文献综述与研究假说 (Literature & Hypotheses) — 2,000–3,000 字
**目标**: 建立理论基础,提出可检验的假说
**内容**:
2.1 理论框架
- 梳理相关理论
- 建立分析框架
2.2 H1: [假说内容]
- 理论逻辑
- 预期符号
2.3 H2: [假说内容]
- 理论逻辑
- 预期符号
2.4 H3: [假说内容]
- 理论逻辑
- 预期符号
---
### 第3章 数据与研究设计 (Data & Methodology) — 2,000–2,500 字
**目标**: 说明数据来源、变量定义和实证策略
**内容**:
3.1 样本与数据来源 (1段)
- 数据来源(CSMAR / Wind / CNRDS / 中国海关等)
- 样本期间
- 样本筛选步骤
3.2 变量定义
- 被解释变量:定义、计算方法
- 核心解释变量:定义、计算方法
- 控制变量:列表
- 【表格3-1:变量定义表】
3.3 描述性统计
- 【表格3-2:描述性统计表】
- 主要变量均值、标准差、最小值、最大值
- 相关系数矩阵(可选)
3.4 实证策略
- DID框架说明
- 基准模型设定
- 平行趋势检验设计
3.5 稳健性检验说明 (1段)
- 列出稳健性检验方案
---
### 第4章 实证结果 (Empirical Results) — 3,000–4,000 字
**目标**: 报告核心实证结果
**内容**:
4.1 平行趋势检验
- 【图4-1:平行趋势检验图】
- 政策前后的趋势对比
- 置信区间说明
4.2 基准回归结果
- 【表格4-1:基准回归表】
- 列(1)–(4):逐步加入控制变量
- 经济意义解读
4.3 机制检验
- 【表格4-2:机制检验表】
- 中介效应检验
- Sobel检验或Bootstrap
4.4 异质性分析
- 【表格4-3 / 图4-2:异质性分析】
- 企业规模异质性
- 所有制异质性
- 行业异质性
- 地区异质性
---
### 第5章 稳健性检验 (Robustness) — 1,500–2,000 字
**目标**: 验证核心结论的可靠性
**内容**:
5.1 安慰剂检验
- 【表格5-1:安慰剂检验表】
- 随机政策时间
- 随机对照组
5.2 替换变量
- 【表格5-2:替换被解释变量】
- 【表格5-3:替换核心解释变量】
5.3 样本选择
- 【表格5-4:PSM匹配后样本】
- 【表格5-5:剔除直辖市/剔除异常值】
5.4 其他稳健性检验
- 【表格5-6:双重聚类标准误】
- 【表格5-7:控制更多固定效应】
---
### 第6章 结论 (Conclusion) — 800–1,200 字
**目标**: 总结发现,阐述意义
**内容**:
6.1 主要发现 (2–3段)
- 简要概括核心结论
6.2 机制解释 (1–2段)
- 解释背后的经济机制
6.3 政策建议 (1–2段)
- 对政府/企业/监管部门的建议
6.4 研究局限与未来方向 (1段)
- 数据、方法或理论局限
- 未来可拓展的方向
---
## 写作注意事项
### 中文顶刊特殊要求
- 使用「本研究」「本文」而非「我」「我们」
- 图表标题放在图表上方,注释放下方
- 表格使用三线表格式
- 参考文献使用 GB/T 7714-2015 格式
- 数学公式使用 align 环境,全文统一编号
- 脚注仅用于补充说明,不用于引用
### 引言写作规范(经济研究标准)
1. 引言长度应为正文的 10–15%
2. 研究贡献应在引言中明确列出(3–5点)
3. 引言最后一段简要说明论文结构
4. 避免在引言中使用"首次""首次发现"等绝对表述
### 实证结果写作规范
1. 每张表格后应有 2–4 段文字解读
2. 系数大小、经济意义、统计显著性三个维度解读
3. 表格标题精炼,不超过 15 个字
4. 表注说明数据来源、变量定义和显著性标注
---
+ ## 文字质量要求(大纲阶段必须嵌入)
+
+ 生成 PAPER_OUTLINE.md 时,必须在每章节的字数目标后嵌入以下质量要求。
+
+ ### 每章节最低质量标准
+
+ | 章节 | 最小段落数 | 表格引导句下限 | 图表注释解读下限 | 底气要求 |
+ |------|-----------|----------------|-----------------|----------|
+ | 引言 | 5段 | — | — | 贡献必须有具体描述,非泛泛而言 |
+ | 文献综述 | 4段 | — | — | 每主题必须有批判性评述 |
+ | 数据与方法 | 4段 | ≥50字/表 | — | 变量定义需完整,无歧义 |
+ | 实证结果 | 6段 | ≥50字/表 | ≥80字/图 | 每条发现必须包含具体数字 |
+ | 稳健性检验 | 4段 | ≥30字/表 | ≥50字/图 | 必须说明"排除何种替代假说" |
+ | 结论 | 4段 | — | — | 每条结论必须含具体数字或机制描述 |
+
+ ### 结论底气标准
+
+ 结论章节的每条发现必须满足以下至少一项:
+
+ - **具体数字**:β = X.XXX,95% CI [X.XXX, X.XXX],p = X.XXX
+ - **经济规模**:占样本均值/标准差的 X%,相当于 X 亿元/万吨/人
+ - **机制描述**:通过 X 渠道传导,而非 Y 渠道
+ - **对比发现**:A 效应是 B 效应的 X 倍,呈现显著差异
+ - **理论对应**:与 [理论名] 的预测一致/相反
+
+ ### 表格引导句标准结构
+
+ 每张表格必须包含以下四要素(在大纲阶段明确标注):
+
+ 1. **主题句**(1句):表格报告什么
+ 2. **来源句**(1句):数据来源和样本量 N
+ 3. **核心发现句**(1-2句):最关键的 1-2 个数字(必须包含)
+ 4. **经济意义句**(1句,可选):数字的经济含义
+
+ ### 图表注释解读标准
+
+ 每张图表的 caption 或注释必须包含:
+
+ 1. **是什么**:图表展示什么变量/关系
+ 2. **怎么读**:X轴Y轴含义、参考线意义
+ 3. **说明什么**:核心发现(1-2句),而非仅描述"展示了变化趋势"
+
+ 示例:
+ - **不合格**:"图1 展示了 TR 和 ESP 的时间趋势"
+ - **合格**:"图1 展示了政策实施前后,处理组(实线)与对照组(虚线)的 TR 和 ESP 变化趋势。政策前两组的 TR 呈现平行趋势,支持平行趋势假设;政策后处理组 TR 显著高于对照组,差距在第 3 年扩大至 X 个单位。"
+
+ ---
+
+ ## AI 味检测章节
+
+ 在大纲生成和写作阶段,必须遵守以下 AI 味检测规范,防止生成顶刊标准下不合格的文字。
+
+ ### AI 味典型句式清单(零容忍)
+
+ 生成文字时,以下句式出现任一项即为不合格,必须重写:
+
+ | 类别 | 典型句式 | 检测关键词 |
+ |------|----------|------------|
+ | 过渡套话 | "值得注意的是""综上所述""客观来说" | 值得注意的是、综上所述、客观来说 |
+ | 模糊程度 | "在一定程度上""某种程度上""相对而言" | 在一定程度上、某种程度上、相对而言 |
+ | 空洞开头 | "近年来""随着时代发展""在当今社会" | 近年来、随着时代发展、当今社会 |
+ | 无力结论 | "可能存在一定影响""有待进一步研究" | 可能存在、有待进一步研究 |
+ | 废话开头 | "首先,我们需要……" | 首先我们需要 |
+ | 堆砌形容 | "非常重要的""具有重大意义的" | 非常重要的、具有重大意义的 |
+ | 被动过度 | "已经被证实""可以被认为" | 已经被、可以被认为 |
+ | 空洞引用 | "XX研究表明""已有学者指出"(无具体发现) | XX研究表明、已有学者指出 |
+ | 中英混杂 | 无故在中文中插入英文词汇 | 仅用于技术术语(API、DID等)|
+
+ ### 替代表达对照表
+
+ | AI 典型(禁止) | 替代表达(推荐) |
+ |------------------|------------------|
+ | "值得注意的是" | 直接说发现,不加铺垫 |
+ | "在一定程度上" | 删除,或改为"实证上""回归结果显示" |
+ | "综上所述" | 改为"具体而言"或直接分段 |
+ | "可能存在一定影响" | "显著提升了 X%(β = 0.XX, p < 0.01)" |
+ | "有待进一步研究" | "本文未涵盖 X,可作为未来研究方向" |
+ | "首先,我们需要……" | 直接列出步骤 |
+ | "近年来,X 研究日益重要" | 直接从 X 的具体发现或争议切入 |
+ | "具有重要的理论和实践意义" | 改为具体贡献描述 |
+
+ ### 语气底气标准
+
+ 结论和关键发现段落必须使用有底气的句式:
+
+ | 无底气(禁止) | 有底气(推荐) |
+ |----------------|----------------|
+ | "研究发现,X 对 Y 有一定影响" | "X 使 Y 平均提升 1.005 个单位(β = 1.005, p < 0.01),占样本均值的 2.8%" |
+ | "H1 得到部分验证" | "H1 得到支持:X 显著提升 Y(H1a,β = 1.005, p < 0.01),但对 Z 的影响不显著(H1b,β = -0.068, p = 0.829)" |
+ | "可能存在异质性" | "效应在大城市是小城市的 1.7 倍(交互项 0.42,p < 0.05),呈现显著规模异质性" |
+ | "研究结论具有一定的政策启示" | "建议优先在大城市试点:以 1 元财政投入可撬动 3.2 元绿色投资回报" |
+
+ ### AI 味自检流程(生成后必须执行)
+
+ 每次生成章节后,按以下步骤自检:
+
+ 1. **扫描关键词**:用正则扫描上述 9 类检测关键词,记录出现次数和位置
+ 2. **评估底气**:检查结论和关键发现段落是否包含具体数字
+ 3. **段落数检查**:确认每章最小段落数达标
+ 4. **表格引导句检查**:确认每张表格前后有完整四要素
+ 5. **图表注释检查**:确认每张图的注释包含"说明什么"而非仅"展示什么"
+
+ 任何一项不通过,必须重写对应段落。
+
+ ---
+
## 模板版本历史
| 版本 | 日期 | 修改内容 |
|------|------|----------|
| v1.0 | 2026-01-01 | 初始版本 |
```
### Template for 实证研究 (JF / JFE / RFS / English Top Journal)
```markdown
# PAPER_OUTLINE.md
> Paper Outline — Generated by fin-paper-plan
> Target Journal: Journal of Financial Economics (JFE)
> Research Type: Empirical
> Language: English
> Version: v1.0
> Generated: 2026-01-01
---
## Word Count Target
- Total: 12,000–20,000 words (excluding references)
- Tables/Figures: ~2,000–3,000 words
- Main text: ~10,000–17,000 words
---
## Chapter Structure
### 1. Introduction — 2,000–3,000 words
1.1 Motivation and Research Question (2 paragraphs)
1.2 Literature Review (2–3 paragraphs)
1.3 This Paper (1 paragraph) ← **Most important paragraph**
- [Background] → [Research question] → [Data & Method] → [Key findings]
1.4 Hypotheses H1/H2/H3 (1–2 paragraphs)
1.5 Contributions (3–5 bullet points)
- Theoretical contribution
- Empirical contribution
- Policy contribution
1.6 Paper Structure (1 paragraph)
### 2. Literature Review and Hypotheses — 2,000–3,000 words
2.1 Theoretical Framework
2.2 H1: [content]
2.3 H2: [content]
2.4 H3: [content]
### 3. Data and Methodology — 2,500–3,000 words
3.1 Sample and Data Sources (1 paragraph)
3.2 Variable Definitions
- Table 1: Variable Definitions
3.3 Descriptive Statistics
- Table 2: Summary Statistics
- Table 3: Correlation Matrix
3.4 Empirical Strategy
- DID framework
- Main model specification
- Parallel trends design
### 4. Empirical Results — 4,000–5,000 words
4.1 Parallel Trends Test
- Figure 1: Event Study / Parallel Trends
4.2 Main Results
- Table 4: Baseline Regression
- Columns (1)–(4): progressively adding controls
4.3 Mechanism Analysis
- Table 5: Mechanism Tests
- Mediation effect检验
4.4 Heterogeneity Analysis
- Table 6 / Figure 2: Heterogeneity by size, ownership, industry
### 5. Robustness Checks — 2,000–3,000 words
5.1 Placebo Tests
- Table 7: Random policy timing
- Table 8: Random control group
5.2 Alternative Measures
- Table 9: Alternative dependent variable
- Table 10: Alternative independent variable
5.3 Sample Selection
- Table 11: PSM-matched sample
- Table 12: Excluding outliers
5.4 Additional Robustness
- Table 13: Double-clustered SEs
- Table 14: Alternative fixed effects
### 6. Conclusion — 1,000–1,500 words
6.1 Main Findings
6.2 Mechanism Explanation
6.3 Policy Implications
6.4 Limitations and Future Research
---
## Writing Notes for English Journals
### AER/JF/JFE/RFS Style
- Use "we" rather than "I"
- Figure captions below figures, table captions above tables
- References: Author (Year) format, e.g., (Smith, 2023)
- Tables: Professional format with notes below
- Math equations: align environment, sequential numbering
- Footnotes: Only for supplementary notes, not for citations
### JFE Specific Requirements
- Maximum 150 characters per abstract line
- JEL Classification codes required (3-digit)
- Keywords: 5–6 terms
### RFS Specific Requirements
- RFS prefers longer tables with extensive robustness
- Online appendix required for supplementary materials
```
## Step 3: Generate FIGURE_PLAN.md
Create a comprehensive figure plan listing all figures needed:
```markdown
# FIGURE_PLAN.md
> Figure Plan — Generated by fin-paper-plan
> Target Journal: 经济研究
> Version: v1.0
> Generated: 2026-01-01
---
## Figure List
| Figure # | Title | Type | Position | Data Source | Purpose |
|----------|-------|------|----------|-------------|---------|
| 图4-1 | 平行趋势检验 | Event Study | 第4章 4.1节 | 基准回归残差 | 验证DID识别假设 |
| 图4-2 | 动态效应 | Coefficient Plot | 第4章 4.2节 | 基准回归 | 展示政策动态效果 |
| 图4-3 | 异质性分析:企业规模 | Grouped Bar | 第4章 4.4节 | 分组回归 | 展示规模异质性 |
| 图5-1 | 安慰剂检验分布 | Histogram | 第5章 5.1节 | 随机抽样系数 | 验证因果效应显著性 |
---
## Figure Specifications
### 图4-1:平行趋势检验
**File**: `fig_parallel_trends.pdf`
**Type**: Event Study / Line Chart with Confidence Intervals
**Position**: 第4章 4.1节(紧随基准回归表之后)
**Data Source**: `empirical_results.dta` — `parallel_trends` 模块输出
**Size**: width=8in, height=5in (8:5 aspect ratio)
**Style**:
- Line plot with markers
- Shaded 95% confidence intervals
- Vertical dashed line at policy year (x=0)
- X-axis: 相对时间(-5 to +5)
- Y-axis: 政策效应系数
- Policy pre-period (t-5 to t-1): 系数接近0,置信区间包含0
- Policy post-period (t+1 to t+5): 系数显著为正
**Caption**: "图4-1 平行趋势检验。纵轴为DID系数,横轴为相对时间(0为政策实施年份),虚线表示95%置信区间。"
**Font**: SimHei, 10pt
**Color Palette**: #2E86AB (主色), #F6AE2D (高亮), #E94F37 (政策时点)
**Output**: draft_v{version}/figures/fig_parallel_trends.pdf
---
### 图4-2:动态效应
**File**: `fig_dynamic_effects.pdf`
**Type**: Coefficient Forest Plot
**Position**: 第4章 4.2节(基准回归结果之后)
**Data Source**: `event_study_regression.dta`
**Size**: width=6in, height=4in
**Style**:
- Horizontal bar or dot plot
- 95% CI whiskers
- Reference line at 0
- Grouped by time period (pre/post)
**Caption**: "图4-2 政策动态效应。展示政策实施前后各期的DID系数估计值。"
```
Continue with detailed specs for each figure...
---
## Step 4: Generate TABLE_PLAN.md
Create a comprehensive table plan listing all tables needed:
```markdown
# TABLE_PLAN.md
> Table Plan — Generated by fin-paper-plan
> Target Journal: 经济研究
> Version: v1.0
> Generated: 2026-01-01
---
## Table List
| Table # | Title | Position | Columns | Format | Notes |
|---------|-------|----------|---------|--------|-------|
| 表3-1 | 变量定义表 | 第3章 3.2节 | 变量名/定义/数据来源/预期符号 | 三线表 | 包含全部变量 |
| 表3-2 | 描述性统计 | 第3章 3.3节 | 变量/均值/标准差/最小值/最大值 | 三线表 | 全样本 |
| 表4-1 | 基准回归结果 | 第4章 4.2节 | (1)–(6)列 | 三线表 | 逐步加入控制变量 |
| 表4-2 | 机制检验 | 第4章 4.3节 | Sobel/ Bootstrap | 三线表 | 中介效应 |
| 表4-3 | 异质性分析 | 第4章 4.4节 | 分组/系数/标准误 | 三线表 | 规模/所有制/行业 |
| 表5-1 | 安慰剂检验 | 第5章 5.1节 | 随机次数/系数均值/p值 | 三线表 | 500次随机抽样 |
| 表5-2 | 替换被解释变量 | 第5章 5.2节 | (1)–(3)列 | 三线表 | 稳健性 |
---
## Table Specifications
### 表3-1:变量定义表
**File**: `tab_variable_definitions.tex` → `tab_variable_definitions.pdf`
**Position**: 第3章 3.2节
**Columns**: 变量名称 | 变量定义 | 数据来源 | 预期符号
**Rows**:
- Panel A: 被解释变量
- innovation | 企业专利申请数量加1取对数 | CNRDS | +
- Panel B: 核心解释变量
- did | 政策组×政策后交互项 | 政策文件 | +
- Panel C: 控制变量
- size | 企业总资产对数 | CSMAR | 控制
- lev | 资产负债率 | CSMAR | 控制
- roa | 资产收益率 | CSMAR | 控制
- ...
**Format**: 三线表,无竖线
**Font**: SimHei, 9pt (table body), 10pt (column headers)
**Notes**:
- (1) *** p<0.01, ** p<0.05, * p<0.1
- 括号内为t值,聚类到企业层面
**Caption**: "表3-1 变量定义"
**Source**: 数据来源标注
---
### 表3-2:描述性统计
**File**: `tab_summary_stats.tex`
**Position**: 第3章 3.3节
**Columns**: 变量 | 观测值 | 均值 | 标准差 | 最小值 | 中位数 | 最大值
**Rows**: 所有主要变量
**Format**: 三线表,数字保留3位小数
**Panel Split** (可选):
- Panel A: 被解释变量和核心解释变量
- Panel B: 控制变量
- Panel C: 工具变量(如有)
**Correlation Matrix** (可选附件):
- Pearson相关系数矩阵
- 右上角或左下角用*标注显著性
**Caption**: "表3-2 描述性统计"
---
### 表4-1:基准回归结果
**File**: `tab_baseline_regression.tex`
**Position**: 第4章 4.2节
**Columns**:
- (1) OLS | (2) DID | (3) DID+YearFE | (4) DID+Ind×Year | (5) DID+Firm+Year | (6) DID+Firm+Ind×Year
**Row Structure**:
```
did (核心解释变量) x.xxx x.xxx x.xxx x.xxx x.xxx x.xxx
(x.xx) (x.xx) (x.xx) (x.xx) (x.xx) (x.xx)
控制变量 Yes Yes Yes Yes Yes Yes
企业固定效应 No No No No Yes Yes
年份固定效应 No Yes Yes Yes Yes Yes
行业×年份固定效应 No No No Yes No Yes
样本量 X,XXX X,XXX X,XXX X,XXX X,XXX X,XXX
R² 0.xxx 0.xxx 0.xxx 0.xxx 0.xxx 0.xxx
```
**Format**:
- 回归系数第一行,标准误括号第二行(换行)
- 系数右上角:***/**/* 标注显著性
- 标准误括号内:t值或聚类标准误标注
**Caption**: "表4-1 基准回归结果"
---
## Step 5: Output Files
After generating all plans, write the files to disk:
```python
import os
from datetime import datetime
output_dir = "output/fin-manuscript/draft_v1"
os.makedirs(output_dir, exist_ok=True)
# Write PAPER_OUTLINE.md
outline_content = generate_paper_outline(journal_config, research_type)
with open(f"{output_dir}/PAPER_OUTLINE.md", "w", encoding="utf-8") as f:
f.write(outline_content)
# Write FIGURE_PLAN.md
figure_plan = generate_figure_plan(figure_list)
with open(f"{output_dir}/FIGURE_PLAN.md", "w", encoding="utf-8") as f:
f.write(figure_plan)
# Write TABLE_PLAN.md
table_plan = generate_table_plan(table_list)
with open(f"{output_dir}/TABLE_PLAN.md", "w", encoding="utf-8") as f:
f.write(table_plan)
print(f"✅ Generated 3 files in {output_dir}/")
print(f" - PAPER_OUTLINE.md")
print(f" - FIGURE_PLAN.md")
print(f" - TABLE_PLAN.md")
```
## Step 6: Display Summary
After generation, display a summary table:
```
✅ PAPER OUTLINE GENERATED
Target Journal: 经济研究
Research Type: 实证研究
Version: v1.0
Outline Structure:
├── 第1章 引言 — 1,500–2,000字
│ ├── 1.1 研究背景与问题提出
│ ├── 1.2 文献综述
│ ├── 1.3 本文研究
│ ├── 1.4 研究假说
│ ├── 1.5 边际贡献
│ └── 1.6 论文结构
├── 第2章 文献综述与研究假说 — 2,000–3,000字
├── 第3章 数据与研究设计 — 2,000–2,500字
├── 第4章 实证结果 — 3,000–4,000字
├── 第5章 稳健性检验 — 1,500–2,000字
└── 第6章 结论 — 800–1,200字
Figures: 4 (平行趋势/动态效应/异质性/安慰剂)
Tables: 9 (变量定义/描述性统计/基准回归/机制/异质性/稳健性×5)
Output Files:
output/fin-manuscript/draft_v1/PAPER_OUTLINE.md
output/fin-manuscript/draft_v1/FIGURE_PLAN.md
output/fin-manuscript/draft_v1/TABLE_PLAN.md
```
---
## Journal Template Selection Code
```python
#!/usr/bin/env python3
"""Journal template selector for fin-paper-plan."""
JOURNAL_TEMPLATES = {
"经济研究": {
"language": "zh",
"class": "ctexart",
"fontsize": "12pt",
"bib_engine": "bibtex",
"bib_style": "gbt-7714-2015",
"encoding": "utf-8",
"sections": ["引言", "文献综述与研究假说", "数据与研究设计", "实证结果", "稳健性检验", "结论"],
"abstract": True,
"keywords": True,
"jel_codes": False,
"word_count_target": "10,000–15,000字",
"required_packages": ["ctex", "amsmath", "amssymb", "booktabs", "threeline", "threelinel", "graphicx", "hyperref"],
},
"金融研究": {
"language": "zh",
"class": "ctexart",
"fontsize": "12pt",
"bib_engine": "bibtex",
"bib_style": "gbt-7714-2015",
"encoding": "utf-8",
"sections": ["引言", "文献综述", "理论分析与研究假说", "研究设计", "实证分析", "稳健性检验", "结论与启示"],
"abstract": True,
"keywords": True,
"jel_codes": False,
"word_count_target": "10,000–15,000字",
"required_packages": ["ctex", "amsmath", "amssymb", "booktabs", "graphicx", "hyperref"],
},
"管理世界": {
"language": "zh",
"class": "ctexart",
"fontsize": "12pt",
"bib_engine": "bibtex",
"bib_style": "gbt-7714-2015",
"encoding": "utf-8",
"sections": ["引言", "文献综述", "理论分析与研究假说", "研究设计", "实证结果", "稳健性检验", "结论与政策建议"],
"abstract": True,
"keywords": True,
"jel_codes": False,
"word_count_target": "8,000–12,000字",
"required_packages": ["ctex", "amsmath", "amssymb", "booktabs", "graphicx", "hyperref"],
"policy_focus": True, # Emphasize policy implications
},
"JF": {
"language": "en",
"class": "aea",
"fontsize": "11pt",
"bib_engine": "bibtex",
"bib_style": "aer",
"encoding": "utf-8",
"sections": ["Introduction", "Literature Review", "Hypotheses", "Data and Methodology", "Results", "Robustness Checks", "Conclusion"],
"abstract": True,
"keywords": True,
"jel_codes": True, # JEL classification required
"word_count_target": "12,000–20,000 words",
"required_packages": ["aertt", "amsmath", "amssymb", "booktabs", "graphicx", "hyperref", "natbib"],
},
"JFE": {
"language": "en",
"class": "jfe",
"fontsize": "11pt",
"bib_engine": "bibtex",
"bib_style": "jfe",
"encoding": "utf-8",
"sections": ["Introduction", "Literature Review", "Hypotheses", "Data", "Empirical Results", "Robustness", "Conclusion"],
"abstract": True,
"keywords": True,
"jel_codes": True,
"word_count_target": "12,000–20,000 words",
"required_packages": ["jfecls", "amsmath", "amssymb", "booktabs", "graphicx", "hyperref", "natbib"],
},
"RFS": {
"language": "en",
"class": "rfs",
"fontsize": "11pt",
"bib_engine": "biblatex",
"bib_style": "rfs",
"encoding": "utf-8",
"sections": ["Introduction", "Literature Review", "Hypotheses", "Data and Methods", "Main Results", "Additional Analyses", "Conclusion"],
"abstract": True,
"keywords": True,
"jel_codes": True,
"word_count_target": "12,000–20,000 words",
"required_packages": ["rfs", "amsmath", "amssymb", "booktabs", "graphicx", "hyperref", "biblatex"],
"online_appendix": True, # RFS requires online appendix
},
}
def select_template(journal_name: str) -> dict:
"""Select the appropriate template for a journal."""
return JOURNAL_TEMPLATES.get(journal_name, JOURNAL_TEMPLATES["经济研究"])
def validate_outline(outline: dict, template: dict) -> list:
"""Validate that the outline matches the journal template requirements."""
issues = []
required_sections = template.get("sections", [])
outline_sections = outline.get("sections", [])
for section in required_sections:
if section not in outline_sections:
issues.append(f"Missing required section: {section}")
if template.get("jel_codes") and "jel_codes" not in outline:
issues.append("JEL codes required but not included")
return issues
```