成分数据分析
成分数据分析(Compositional data analysis,CoDA)是统计学的一个分支,处理的是只携带相对信息的数据,例如百分比、比例或百万分数值——这些数值之和为一个固定总量。由于每个观测的各成分被约束为恒定总和,直接将普通多元方法应用于原始数值会产生虚假相关和扭曲的协方差结构;CoDA 转而分析成分之间比值的对数,在一个为受约束数据而设计的单纯形几何中进行。1 • 2 该领域建立在 J. Aitchison 1986 年专著《成分数据的统计分析》(The Statistical Analysis of Compositional Data)所确立的对数比方法之上。3
| 关键事实 | 详情 |
|---|---|
| 定义 | 携带相对而非绝对信息的非负数据,通常受恒定总和约束(比例之和为 1,百分比之和为 100)1 |
| 核心问题 | 闭合在固定总和成分数据的各成分之间诱发虚假相关;共享同一成分的比值之间的相关也可能源自该共享分母,而与闭合无关2 • 25 |
| 解决方案 | 变换为成分比值的对数,之后标准的单变量和多元方法即可适用1 |
| 主要变换 | 加性对数比(alr)、中心对数比(clr)和等距对数比(ilr),各有不同的取舍4 |
| 核心实践障碍 | 零值,因为对数比在零处无定义;稀疏测序表可达约 90% 的零单元格1 • 5 |
| 奠基工作 | Aitchison 1986 年的专著,其前身为他 1982 年向皇家统计学会宣读的论文3 • 6 |
| 软件 | R 包,包括 compositions、zCompositions、robCompositions、ALDEx2、philr 和 CoDaLoMic7 |
工作原理
含 D 个部分的成分的样本空间是单纯形,即各分量非负且总和为常数 κ 的向量集合,其中 κ 对比例为 1,对百分比为 100,对 ppm 为 ,对 ppb 为 。4 在此空间内,普通加法和标量乘法被两种运算取代:扰动,定义为 ,其中 C 表示闭合(重新缩放使总和为 κ);以及幂运算,。4 这些运算由 Aitchison 在其 1986 年专著中引入,使单纯形成为一个阿贝尔群,并构成了如今所称的艾奇逊几何(Aitchison geometry)的基础。3 • 8 距离用艾奇逊距离度量,它由对数比差的平方和构成;各部分之间的依赖性由变异矩阵 概括,其中 ; 接近零的值表明部分 和 成比例。4
Aitchison 表明,无论采用变换技术还是留在单纯形内的方法,推断结果都是相同的。9 指导原则是尺度不变性:成分只提供关于各部分相对大小的信息,因此分析应基于成分比值,而对数使这些比值在数学上易于处理。9
如何实施
典型工作流程先处理零值,选择一种对数比变换,然后对变换后的坐标应用标准多元方法。1 一旦数据变换为对数比,就可以使用降维、聚类和建模等常规方法。1 成分均值以闭合几何均值的形式恢复,,因此估计值通过逆 clr 回到单纯形。4
零值要求在计算任何对数比之前做出决定。零值被分类为低于检测限的零值、结构零值和随机缺失值,即使仔细的插补也可能根据数据集其余部分的不同而产生截然不同的比值。10 替代替换的方法包括:将含缺失部分的 clr 变换成分投影到缺失部分 clr 方向的正交补上,从而在不插补的情况下给出无偏的均值和方差估计量;10 合并成分以消除零值;1 以及反正弦转换,后者在零处有良好定义且无需替换。11
主要的 R 实现有 compositions、zCompositions(左删失成分数据的多元插补)、robCompositions(稳健分析)、ALDEx2、philr 和 CoDaLoMic。7 • 1 ALDEx2 由 Andrew D Fernandes 及其同事于 2014 年在《微生物组》上提出,它使用从狄利克雷分布采样的蒙特卡洛实例将读数建模为比例,并在贝叶斯框架下处理零值。12
起源
Karl Pearson 于 1897 年在《伦敦皇家学会会刊》(Proceedings of the Royal Society of London)上警告不要解释分子和分母含有共同部分的比值之间的相关,并证明如果 X、Y 和 Z 不相关,X/Z 和 Y/Z 也不会不相关。13 • 2 这一警告在很大程度上被忽视,直到 1960 年代,包括 Chayes、Krumbein、Sarmanov 和 Vistelius 在内的地质学家以及生物学家 Mosimann 再次提出了这个问题;Chayes 1960 年在《地球物理研究杂志》(Journal of Geophysical Research)上的论文将虚假相关与恒定总和数据联系起来,并表明由于单位总和约束,成分之间的某些相关必然是负的。9 • 14 • 2
一套恰当的方法论在 1980 年代出现:单纯形上的逻辑正态分布由 J. Aitchison 和 S. M. Shen 于 1980 年在《生物计量学》(Biometrika)上提出,15 • 6 • 16 而 1986 年的专著确立了该领域。3 这项工作是对原始百分比无约束分析的反动,后者忽视了数据点被限制在单纯形内这一事实。16
变体
三种经典变换在参照和几何上有所不同。加性对数比将含 D 个部分的成分映射到 ,形式为 ,逆变换为 ;它支持无约束分析,但使用任意参照部分并在斜基中定义坐标,因此不是等距变换。4 • 7 中心对数比对称地对待各部分,,其中 ,逆变换为 ,但所得的 D 个坐标是奇异的(它们之和为零),且 clr 不具有子成分一致性。4 • 6 • 7 等距对数比,,其中 ,产生 个线性无关的等距坐标;其缺点是将这些坐标解释为几何均值之比较为复杂。4 • 6 平衡(balances)提供了可解释的 ilr 坐标:对各部分进行序贯二元划分可定义 个平衡,其方差之和等于样本总方差,该方法由 J. J. Egozcue 和 V. Pawlowsky-Glahn 于 2005 年在《数学地质》(Mathematical Geology)上提出。17 • 7
领域特定的变体包括 PhILR——一种用于微生物群数据的系统发育 ilr 变换,由 Justin D Silverman 及其同事于 2017 年在《eLife》上描述,18 以及在《健康与疾病中的微生物生态学》(Microbial Ecology in Health and Disease)上介绍的 ANCOM,连同在《自然·通讯》(Nature Communications)上介绍的、经过偏差校正的后继方法 ANCOM-BC。19 • 20 近期的补充包括 chiPower 变换——一种基于幂的、可允许零值的对数比替代方法,由 Michael Greenacre 于 2024 年在《数据分析与分类进展》(Advances in Data Analysis and Classification)上描述。21 • 6
应用
CoDA 起源于地球化学,该领域以百分比或 ppm 记录的数据受恒定总和约束,使得许多普通统计分析无法进行。22 高通量测序是另一个主要应用领域:RNA-seq 和 16S rRNA 数据集是成分性的,因为每个样本的总读数不携带信息,它们映射到艾奇逊单纯形而非欧几里得空间,而标准工具假设欧几里得计数数据。12
局限与替代方案
已命名的失效模式源于该理论。子成分一致性——即对部分子集的结果应与对完整成分的结果一致——是一项定义性原则,而 clr 违反了它;单纯形上的线性约束在对数比表示下也变为非线性的。2 • 7 模拟表明,零值的比例和零值替换值的选择都会显著影响对 ALR/CLR 变换数据检验的效能和错误发现率,而 ILR 保持几何性质,但在高维或小样本情形下统计效能可能低于 ALR/CLR。11
与替代方案相比,ANCOM-BC 通过线性回归模型中的样本特定偏移校正不等采样分数,在模拟中 ANCOM 和 ANCOM-BC 在名义水平上控制 FDR,除非样本量低于 10,而其他方法的 FDR 随样本量增加而不断膨胀;DESeq2 和 edgeR 等 RNA-seq 方法在微生物组数据上表现不佳,因为其归一化假设极少数分类单元存在差异丰度。23 一项 38 个数据集的基准测试发现差异丰度工具之间差异很大,ALDEx2 和 ANCOM-II 最为保守和一致,并建议对 16S 数据避免使用 edgeR 和未校正的 LEfSe,而采用多方法共识。24
References
- Compositional Data Analysis (Annual Review of Statistics and Its Application)
- Compositional Data: An Overview (Bacon-Shone, JSM 2014 proceedings)
- J. Aitchison (1986). The Statistical Analysis of Compositional Data. .
- Compositional Data Analysis in a Nutshell (Tolosana-Delgado, 2008)
- Comparison of zero replacement strategies for compositional data with large numbers of zeros (Lubbe, Filzmoser & Templ, 2021, Chemometrics and Intelligent Laboratory Systems 210:104248)
- Aitchison's Compositional Data Analysis 40 Years On: A Reappraisal (Greenacre)
- Visualizing balances of compositional data (F1000Research, 2018)
- The Mathematics of Compositional Analysis (Austrian Journal of Statistics)
- A Concise Guide to Compositional Data Analysis (Aitchison)
- Concepts for handling of zeros and missing values in compositional data (van den Boogaart & Tolosana-Delgado, IAMG 2006)
- Review and revamp of compositional data transformation: A new framework combining proportion conversion and contrast transformation
- Unifying the analysis of high-throughput sequencing datasets: characterizing RNA-seq, 16S rRNA gene sequencing and selective growth experiments by compositional data analysis (Gloor et al., Microbiome 2014; ALDEx2)
- Karl Pearson (1897). Mathematical contributions to the theory of evolution., On a form of spurious correlation which may arise when indices are used in the measurement of organs. Proceedings of the Royal Society of London.
- F. Chayes (1960). On correlation between variables of constant sum. Journal of Geophysical Research Atmospheres.
- J. Aitchison, S. M. Shen (1980). Logistic-Normal Distributions: Some Properties and Uses. Biometrika.
- Aitchison (1982) read paper full text, Royal Statistical Society
- J. J. Egozcue, V. Pawlowsky-Glahn (2005). Groups of Parts and Their Balances in Compositional Data Analysis. Mathematical Geology.
- Justin D Silverman and colleagues (2017). A phylogenetic transform enhances analysis of compositional microbiota data. eLife.
- Siddhartha Mandal and colleagues (2015). Analysis of composition of microbiomes: a novel method for studying microbial composition. Microbial Ecology in Health and Disease.
- Huang Lin, Shyamal Das Peddada (2020). Analysis of compositions of microbiomes with bias correction. Nature Communications.
- Michael Greenacre (2024). The chiPower transformation: a valid alternative to logratio transformations in compositional data analysis. Advances in Data Analysis and Classification.
- Problems in compositional data analysis and their solutions (Ohta & Arai, J. Geol. Soc. Japan, 2006)
- Analysis of microbial compositions: a review of normalization and differential abundance analysis (npj Biofilms and Microbiomes, 2020)
- Microbiome differential abundance methods produce different results across 38 datasets (Nature Communications)
- Proportionality: A Valid Alternative to Correlation for Relative Data
Initially written Sep 29, 2026 · Edited: Oct 15, 2026
你的笔记
© 2026 Biostate AI。依据 Edgepedia Community License,注明出处即可免费使用。 嵌入参考卡片。