Tooluck logoTooluck
SKILL.md

science-statistics-choice

Agent skill fromyzlin286-wq/Deepscient

Use when you have data and must decide which test to run — when someone asks "该用什么检验", when a reviewer says the analysis does not match the design, when assumptions are violated and you need the honest fallback instead of the convenient one, when the effect size or correction method is missing from the results, or when a p-value is being asked to carry a claim it cannot carry; also use before data collection to size the study, and when interpreting a result that is significant but tiny.

How to install science-statistics-choice

install science-statistics-choice
# install the Deepscient pack with the skills CLI
npx skills add yzlin286-wq/Deepscient

# or add only this skill to Claude Code: copy the folder

dsh-science/skills/science/science-statistics-choice/

# into

~/.claude/skills/science-statistics-choice/ (all projects)

.claude/skills/science-statistics-choice/ (one project)

dsh-science/skills/science/science-statistics-choice/SKILL.md

MITFull file
1# 统计选择:设计决定检验,假设决定能不能用
2
3## 三条不能破的铁律
4
51. **检验由设计决定,不由数据长什么样决定。**
6 先有 `design`(几组、配对否、结局类型、是否重复测量),才有候选检验。
7 拿到数据后试三种检验挑 p 最小的,那不是分析,是搜索。
82. **假设不满足时必须降级,不能默认继续。**
9 每个检验都带 `assumptions` 与 `fallback`。假设没查或不满足,正确动作是
10 **换 fallback 检验并在正文说明**,而不是「反正结果差不多」。
113. **p 值不是效应量。** 报告必须同时给:检验统计量、自由度、p、效应量、效应量的置信区间。
12 缺效应量的结果在顶刊会被直接退回补充。
13
14## 决策树怎么走
15
16决策树只问**设计问题**,不问「你希望显著吗」。
17
18```
19根节点 outcome(结局类型:连续 / 二分类 / 计数 / 生存 / 有序 / 多元)
20 → design-*(组数、配对、独立、重复测量)
21 → 叶子:一个检验 id + 该检验的假设清单 + fallback 链
22```
23
24走不下去时通常是两个原因:结局类型没说清("分数"是连续还是等级?),
25或者设计里有嵌套(同一被试多次测量 → 那是重复测量,不是独立两组)。
26这两个都要先答清楚,再回来走树。
27
28每个叶子给出的是**检验 id**,用它去 `data/statistics.json` 取完整定义:
29`requires` / `assumptions` / `fallback` / `effectSizes` / `power` / `py` / `reportAs` / `misuse` / `source`。
30
31## 选检验时必须一起决定的四件事
32
33### 1. 单双侧
34
35双侧是默认。单侧只在**事前**有方向性假设且方向不可反时使用,
36并且必须在方法里写明"单侧检验,方向为 X"。事后按结果挑方向 = p 值减半的作弊。
37
38### 2. 多重比较
39
40| 情况 | 用什么 | 为什么 |
41| --- | --- | --- |
42| 一个主假设 | 不校正,但必须声明"这是唯一主结局" | 校正会无谓损失功效 |
43| 少数几个预设的次要结局 | Holm | 控制 FWER,比 Bonferroni 更有功效 |
44| 探索性、大量指标(组学、脑影像体素) | BH(FDR) | 控制错误发现比例 |
45| 相关性强(脑区、时间点) | BH 偏保守,考虑置换检验 | 独立性假设不成立 |
46
47**绝不能做的事**:测了 12 个指标,只报 p<.05 的 3 个,不说测了 12 个。
48这在方法上叫选择性报告,在结果上让「显著」变成必然事件。
49
50### 3. 效应量与它的置信区间
51
52效应量要和检验配套:t 检验配 Cohen's d、ANOVA 配 η²/偏 η²、卡方配 Cramér's V 或 OR、
53生存配 HR 或 RMST 差、非参数配 rank-biserial 或中位数差。
54
55「小/中/大」的标签(.2/.5/.8)是**跨领域的粗糙约定**,不是判决。
56在心理学 d=0.3 可能很重要,在药物试验里 d=0.3 可能毫无临床意义——
57判断标准是这个领域的**最小可觉察/最小临床重要差异**,不是标签。
58
59### 4. 功效
60
61功效必须**事前**算。给 `α`、目标 `power`(默认 .80,复制研究用 .90)、
62…

Excerpt shown under the repository's MIT license.

More skills in Deepscient

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates