从科技论文中蒸馏数据分析方法与描述指数,构建个人方法知识库;后续数据分析时自动匹配最佳方法或推荐可计算的专门指标,提供逐步执行指导与代码模板(Python + R)。
English below
论文 PDF/URL/文本 → 方法/指数识别 → 知识验证 → 卡片生成 → 入库更新
- 🔍 智能识别:自动提取论文中使用的统计方法、描述指数、参数设置和变体
- ✅ 知识验证:对照权威统计教材(Quinn & Keough, Sokal & Rohlf 等)验证适用条件
- 📝 卡片生成:按标准化模板生成方法/指数卡片,含适用场景、数据要求、前置检验、效应量、常见误用
- 📚 渐进扩充:知识库从核心方法起步,随论文蒸馏持续增长
数据分析需求 → 目标判断 → 分支路由
├── 统计推断 → 决策树匹配 → 方案推荐 → 执行指导 → 结果审查
└── 描述指数 → 指数推荐 → 计算指导
- 🌳 决策树路由:基于因变量类型、自变量、实验设计、分布假设等6维特征自动匹配
- 📊 指数推荐:根据数据类型推荐可计算的专门指标(多样性指数、相似性指数等)
- 📋 逐步指导:前置检验 → 主分析 → 效应量 → 事后比较 → 结果报告
- 🐍 Python + R 双语模板:每个方法/指数提供完整可执行代码,附带测试数据
⚠️ 误用预警:标注常见误用和替代方案
核心原则:统计方法(stat-/eco-前缀)与描述指数(index-前缀)分区存放,不混放。
| 方法 | 类别 | 非参数替代 |
|---|---|---|
| 独立样本 t 检验 | 均值比较 | Mann-Whitney U |
| 单因素 ANOVA | 均值比较 | Kruskal-Wallis |
| 双因素 ANOVA | 方差分析 | — |
| Tukey HSD 事后比较 | 方差分析 | — |
| Shapiro-Wilk 正态性检验 | 前置检验 | — |
| 重复测量 ANOVA | 均值比较 | Friedman 检验 |
| Pearson 相关分析 | 关联分析 | Spearman 相关 |
| Spearman 秩相关 | 关联分析 | — |
| 简单线性回归 | 回归分析 | — |
| 多元线性回归 | 回归分析 | 岭回归/LASSO |
| 逻辑回归 | 回归分析 | — |
| 指数回归 | 回归分析 | — |
| 卡方独立性检验 | 分类数据分析 | Fisher 精确检验 |
| Mann-Whitney U 检验 | 非参数 | — |
| Kruskal-Wallis 检验 | 非参数 | — |
| NMDS 非度量多维标度 | 排序 | — |
| PERMANOVA 置换多元方差 | 方差分析 | — |
| RDA 冗余分析 | 约束排序 | CCA |
| 共现网络分析 | 群落分析 | — |
| Zi-Pi 关键物种识别 | 群落分析 | — |
| 网络稳健性分析 | 群落分析 | — |
| 指数 | 类别 | 用途 |
|---|---|---|
| Shannon-Wiener 多样性 | α多样性 | 群落多样性度量 |
| Simpson 多样性 | α多样性 | 优势种权重度量 |
| Margalef 丰富度 | α多样性 | 物种丰富度 |
| Pielou 均匀度 | α多样性 | 分布均匀性 |
| Berger-Parker 优势度 | α多样性 | 最丰种占比 |
| Chao1 丰富度估计 | 丰富度估计 | 稀有种校正 |
| ACE 丰富度估计 | 丰富度估计 | 覆盖率校正 |
| Sørensen 相似性 | β多样性 | 群落比较 |
| Jaccard 相似性 | β多样性 | 群落比较 |
| Bray-Curtis 相异度 | β多样性 | 丰度差异 |
| 重要值 (IV) | 群落结构 | 优势种确定 |
| NDVI 归一化植被指数 | 环境指数 | 植被覆盖遥感 |
- Python 3.8+(运行 Python 代码模板)
- R 4.0+(运行 R 代码模板)
pip install -r requirements.txt蒸馏这篇论文中使用的统计方法:[论文PDF/URL/文本]
触发词:蒸馏论文、提取方法、distill
我的因变量是植物生物量(连续),自变量是施肥处理(4个水平),该用什么统计方法?
触发词:选方法、怎么做分析、which test、帮我选分析方法
我的数据是群落物种丰度表,可以计算哪些多样性指数?
触发词:算什么指数、推荐指标、多样性怎么算、计算指数、which index
# Python 示例:独立样本 t 检验
from scipy import stats
import numpy as np
group1 = np.array([23.1, 25.4, 22.8, 24.6, 26.2])
group2 = np.array([20.3, 19.8, 21.2, 18.9, 20.6])
# 前置检验
_, p_norm1 = stats.shapiro(group1)
_, p_norm2 = stats.shapiro(group2)
_, p_levene = stats.levene(group1, group2)
# t 检验
t_stat, p_val = stats.ttest_ind(group1, group2)
print(f"t = {t_stat:.4f}, p = {p_val:.4f}")📖 更多示例见
docs/quick-start.md和examples/
data-analysis-distiller/
├── README.md # 本文件
├── LICENSE # MIT 开源协议
├── CHANGELOG.md # 版本变更记录
├── CONTRIBUTING.md # 贡献指南
├── requirements.txt # Python 依赖
├── SKILL.md # 技能定义文件
├── examples/
│ └── distillation-example.md # 蒸馏过程完整示例
├── docs/
│ └── quick-start.md # 快速入门指南
└── references/
├── distillation-protocol.md # 蒸馏协议(含描述指数分支)
├── method-card-template.md # 方法/指数卡片双模板
├── decision-tree.md # 方法选择决策树(含指数推荐分支)
├── quality-checklist.md # 蒸馏质量检查清单
├── method-cards/ # 📚 方法知识库(33条)
│ ├── _index.md # 总索引(双分区)
│ ├── _category-map.md # 分类图谱
│ ├── stat-*.md # 通用统计方法(15条)
│ ├── eco-*.md # 生态学分析方法(6条)
│ └── index-*.md # 描述指数(12条)
└── code-templates/ # 💻 代码模板库(44个)
├── python/ # Python 实现(22个)
└── r/ # R 实现(22个)
所有 Python 代码模板已通过可执行性验证:
| 模板 | 结果 |
|---|---|
| t-test.py | ✅ t=8.29, p<0.001, Cohen's d=3.71 |
| anova.py | ✅ F=19.78, p<0.001, η²=0.49 |
| chi-square.py | ✅ χ²=14.87, p<0.001, V=0.34 |
| correlation.py | ✅ r=0.99, p<0.001 |
| mann-whitney.py | ✅ r=0.79 |
| linear-regression.py | ✅ R²=0.93 |
| multiple-regression.py | ✅ R²=0.77 |
| logistic-regression.py | ✅ AUC=0.92 |
| kruskal-wallis.py | ✅ H=20.48, p<0.001, η²=0.88 |
| repeated-measures-anova.py | ✅ F=32.38, p<0.001 |
你的数据分析任务
│
├── 因变量 = 连续
│ ├── 1个分类自变量(2组) → 正态? → t检验 / Mann-Whitney U
│ ├── 1个分类自变量(3+组) → 正态? → ANOVA / Kruskal-Wallis
│ ├── 1个连续自变量 → 线性回归 / Pearson相关
│ ├── 多个自变量 → 多元线性回归
│ └── 重复测量 → 重复测量ANOVA
│
├── 因变量 = 二分类 → 逻辑回归 / 卡方检验
├── 因变量 = 等级 → 非参数方法
├── 因变量 = 计数 → 泊松/负二项回归
└── 因变量 = 生存时间 → Cox回归
📖 完整决策树见
references/decision-tree.md
欢迎贡献新的方法卡片、代码模板或改进现有内容!详见 CONTRIBUTING.md
- Fork 本仓库
- 按
method-card-template.md创建新方法卡片 - 附带 Python + R 双语代码模板
- 通过
quality-checklist.md质量检查 - 提交 Pull Request
本项目采用 MIT 许可协议。
方法验证参考以下权威教材:
- Quinn & Keough (2002) Experimental Design and Data Analysis for Biologists
- Sokal & Rohlf (1995) Biometry
- Zuur et al. (2010) A Beginner's Guide to GLM and GLMM
- Crawley (2013) The R Book
- Legendre & Legendre (2012) Numerical Ecology
Distill data analysis methods and descriptive indices from scientific papers, build a personal method knowledge base; automatically match the best method or recommend computable indices for subsequent data analysis, with step-by-step execution guidance and code templates (Python + R).
Paper PDF/URL/Text → Method/Index Identification → Knowledge Verification → Card Generation → Knowledge Base Update
- 🔍 Smart identification: Automatically extract statistical methods, descriptive indices, parameters, and variants from papers
- ✅ Knowledge verification: Validate applicability conditions against authoritative textbooks
- 📝 Card generation: Generate standardized method/index cards with applicability, data requirements, assumptions, effect sizes, and common misuses
- 📚 Progressive expansion: Knowledge base grows continuously as more papers are distilled
Data Analysis Need → Goal Detection → Branch Routing
├── Statistical Inference → Decision Tree Matching → Recommendation → Execution Guide → Result Review
└── Descriptive Indices → Index Recommendation → Computation Guide
- 🌳 Decision tree routing: 6-dimensional feature matching (DV type, IV, design, distribution, sample size, goal)
- 📊 Index recommendation: Suggest computable indices based on data type (diversity, similarity, etc.)
- 📋 Step-by-step guidance: Assumption checks → Main analysis → Effect size → Post-hoc → Reporting
- 🐍 Python + R dual templates: Complete executable code with test data for every method/index
⚠️ Misuse alerts: Common misuses and alternative approaches highlighted
- Python 3.8+ (for Python code templates)
- R 4.0+ (for R code templates)
pip install -r requirements.txtDistill the statistical methods used in this paper: [Paper PDF/URL/text]
Trigger words: distill, extract methods
My DV is plant biomass (continuous), IV is fertilization treatment (4 levels), what statistical method should I use?
Trigger words: which test, choose method, how to analyze
My data is a community species abundance table, what diversity indices can I calculate?
Trigger words: which index, recommend index, calculate index, diversity index
📖 See
docs/quick-start.mdfor more examples
Contributions are welcome! See CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.