Compositional data

Uses your system voice; voice and rate in settings.

Snapshot

≈ 11 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In statistics, compositional data are quantitative descriptions of the parts of some whole, conveying relative information. Mathematically, compositional data is represented by points on a simplex. Measurements involving probabilities, proportions, percentages, and ppm can all be thought of as compositional data. All analyses of real data deals with noisy measurements. The simpler case is in empirical studies such as questionnaire surveys, where each respondent's total allocation is fixed and one must deal solely with the effects of closure, odds and odds ratios serve as invariant statistics. In such cases, associations are determined solely by the magnitude of the odds ratio relative to 1. But in compositional data containing noise, the noise is present in the total sum and is distributed asymmetrically among the individual components. Since noise and signal are inseparable, the data can only be dichotomized into zeros and noise-contaminated components. Therefore, without explicit noise filtering, even statistics based on odds remain mathematically ill-defined. Indeed, odds and their ratios can only be calculated across samples in the absolute absence of any noise other than that induced by the compositionality itself (except for normalization).

In statistics, compositional data are quantitative descriptions of the parts of some whole, conveying relative information. Mathematically, compositional data is represented by points on a simplex. Measurements involving probabilities, proportions, percentages, and ppm can all be thought of as compositional data. All analyses of real data deals with noisy measurements. The simpler case is in empirical studies such as questionnaire surveys, where each respondent's total allocation is fixed and one must deal solely with the effects of closure, odds and odds ratios serve as invariant statistics. In such cases, associations are determined solely by the magnitude of the odds ratio relative to 1. But in compositional data containing noise, the noise is present in the total sum and is distributed asymmetrically among the individual components. Since noise and signal are inseparable, the data can only be dichotomized into zeros and noise-contaminated components. Therefore, without explicit noise filtering, even statistics based on odds remain mathematically ill-defined. Indeed, odds and their ratios can only be calculated across samples in the absolute absence of any noise other than that induced by the compositionality itself (except for normalization). ==Ternary plot== Compositional data in three variables can be plotted via ternary plots. The use of a barycentric plot on three variables graphically depicts the ratios of the three variables as positions in an equilateral triangle. To demonstrate the baseline invariance under pure conditions, consider the ratio between two components, x_i and x_j , within a given sample under purely compositional effects. Letting k denote the scaling factor applied to maintain a constant row total, the closed compositional values are expressed as kx_i and kx_j . Their ratio then becomes \frac{kx_i}{kx_j} = \frac{x_i}{x_j} , wherein k cancels out completely. Similarly, the odds ratio between two distinct samples (or conditions), expressed as \frac{x_{1i}/x_{1j}}{x_{2i}/x_{2j}} , remains entirely unaffected by sample-specific closure factors. Under these pure conditions, the relative order of the components derived from the observed percentage data deterministically reflects the true physical ordering, allowing for the exact calculation of the odds ratio as a definitive value for the study. The resulting odds ratio can be classified into three distinct categories based on its magnitude relative to 1: a negative association ( ), complete independence ( ), and a positive association ( ). ==Why Log-Ratio Transformations Fail Even for Solely Positive Compositional Data== When there are three or more components, there are three or more possible combinations of relative relationships. Therefore, with two components, the ratio between them can be defined as the odds; however, with three or more components, while the ratio between components is mathematically calculable, it lacks a generalized meaning. In conclusion, a logarithmic ratio transformation is not well defined, for compositional data consisting solely of positive three or more components. ==Simplicial sample space== In general, John Aitchison defined compositional data to be proportions of some whole in 1982. In particular, a compositional data point (or composition for short) can be represented by a real vector with positive components. The sample space of compositional data is a simplex: \mathcal{S}^D=\left\{\mathbf{x}=[x_1,x_2,\dots,x_D]\in\mathbb{R}^D \,\left|\, x_i>0,i=1,2,\dots,D; \sum_{i=1}^D x_i=\kappa \right. \right\}. \ The only information is given by the ratios between components, so the information of a composition is preserved under multiplication by any positive constant. Therefore, the sample space of compositional data can always be assumed to be a standard simplex, i.e. \kappa = 1 . In this context, normalization to the standard simplex is called closure and is denoted by \scriptstyle\mathcal{C}[\,\cdot\,] : \mathcal{C}[x_1,x_2,\dots,x_D]=\left[\frac{x_1}{\sum_{i=1}^D x_i},\frac{x_2}{\sum_{i=1}^D x_i}, \dots,\frac{x_D}{\sum_{i=1}^D x_i}\right],\ where D is the number of parts (components) and [\cdot] denotes a row vector. x \oplus y = \left[\frac{x_1 y_1}{\sum_{i=1}^D x_i y_i},\frac{x_2 y_2}{\sum_{i=1}^D x_i y_i}, \dots, \frac{x_D y_D}{\sum_{i=1}^D x_i y_i}\right] = C[x_1 y_1, \ldots, x_D y_D] \qquad \forall x, y \in S^D Powering (scalar multiplication) \alpha \odot x = \left[\frac{x_1^\alpha}{\sum_{i=1}^D x_i^\alpha},\frac{x_2^\alpha}{\sum_{i=1}^D x_i^\alpha}, \ldots,\frac{x_D^\alpha}{\sum_{i=1}^D x_i^\alpha} \right] = C[x_1^\alpha, \ldots, x_D^\alpha] \qquad \forall x \in S^D, \; \alpha \in \mathbb{R} Inner product \langle x, y \rangle = \frac{1}{2D} \sum_{i=1}^D \sum_{j=1}^D \log \frac{x_i}{x_j} \log \frac{y_i}{y_j} \qquad \forall x, y \in S^D Endowed with those operations, the Aitchison simplex forms a (D-1) -dimensional Euclidean inner product space. The uniform composition \left[\frac{1}{D}, \dots, \frac{1}{D}\right] is the zero vector. x = \bigoplus_{i=1}^{D-1} x_i^* \odot e_i where e_1, \ldots, e_{D-1} forms an orthonormal basis in the simplex. The values x_i^*, i=1,2,\ldots,D-1 are the (orthonormal and Cartesian) coordinates of x with respect to the given basis. They are called isometric log-ratio coordinates (\operatorname{ilr}) . \operatorname{alr}(x) = \left[ \log \frac{x_1}{x_D}, \cdots, \log \frac{x_{D-1}}{x_D} \right] The choice of denominator component is arbitrary, and could be any specified component. This transform is commonly used in chemistry with measurements such as pH. In addition, this is the transform most commonly used for multinomial logistic regression. The alr transform is not an isometry, meaning that distances on transformed values will not be equivalent to distances on the original compositions in the simplex. \operatorname{clr}(x) = \left[ \log \frac{x_1}{g(x)}, \cdots, \log \frac{x_D}{g(x)} \right] Where g(x) is the geometric mean of x . The inverse of this function is also known as the softmax function. \sum_{i=1}^{D} \text{CLR}(x_i) = 0 Geometrically, this constraint confines the transformed data to a (D-1) -dimensional hyperplane embedded within the D -dimensional real space \mathbb{R}^D . This structural collinearity induces an absolute rank deficiency in the variance-covariance structure, reducing its true rank to D-1 . As a direct consequence, the resulting covariance matrix \Sigma of the CLR-transformed values is strictly singular, and its determinant is zero: |\Sigma| = 0 Because a singular matrix mathematically lacks an inverse ( \Sigma^{-1} does not exist), standard multivariate procedures that strictly rely on the inverse covariance matrix—such as the Mahalanobis distance, Linear Discriminant Analysis (LDA), and maximum likelihood estimations—are structurally unsupported. Resorting to the Moore-Penrose pseudo-inverse ( \Sigma^+ ) serves as a numerical workaround but does not resolve the underlying dimensional contradiction. \operatorname{ilr}(x) = \big[ \langle x, e_1 \rangle, \ldots, \langle x, e_{D-1} \rangle\big] There are multiple ways to construct orthonormal bases, including using the Gram–Schmidt orthogonalization or singular-value decomposition of clr transformed data. Another alternative is to construct log contrasts from a bifurcating tree. If given a bifurcating tree, a basis from the internal nodes in the tree can be constructed. Each vector in the basis would be determined as follows e_\ell = C[\exp( \,\underbrace{0,\ldots,0}_k, \underbrace{a,\ldots,a}_r,\underbrace{b,\ldots,b}_s,\underbrace{0,\ldots,0}_t \, )] The elements within each vector are given as follows a = \frac{\sqrt{s}}{\sqrt{r(r+s)}} \quad \text{and} \quad b = \frac{-\sqrt{r}}{\sqrt{s(r+s)}} where k, r, s, t are the respective number of tips in the corresponding subtrees shown in the figure. It can be shown that the resulting basis is orthonormal Once the basis \Psi is built, the ilr transform can be calculated as follows \operatorname{ilr}(x) = \operatorname{clr}(x) \Psi^T where each element in the ilr transformed data is of the following form b_i = \sqrt{\frac{rs}{r+s}} \log \frac{g(x_R)}{g(x_S)} where x_R and x_S are the set of values corresponding to the tips in the subtrees R and S ==Examples== In chemistry, compositions can be expressed as molar concentrations of each component. As the sum of all concentrations is not determined, the whole composition of D parts is needed and thus expressed as a vector of D molar concentrations. These compositions can be translated into weight per cent multiplying each component by the appropriated constant. In demography, a town may be a compositional data point in a sample of towns; a town in which 35% of the people are Christians, 55% are Muslims, 6% are Jews, and the remaining 4% are others would correspond to the quadruple [0.35, 0.55, 0.06, 0.04]. A data set would correspond to a list of towns. In geology, a rock composed of different minerals may be a compositional data point in a sample of rocks; a rock of which 10% is the first mineral, 30% is the second, and the remaining 60% is the third would correspond to the triple [0.1, 0.3, 0.6]. A data set would contain one such triple for each rock in a sample of rocks. In high throughput DNA sequencing and RNA sequencing, data obtained are typically transformed to relative abundances, rendering them compositional. In probability and statistics, a partition of the sampling space into disjoint events is described by the probabilities assigned to such events. The vector of D probabilities can be considered as a composition of D parts. As they add to one, one probability can be suppressed and the composition is completely determined. In chemometrics, for the classification of petroleum oils. In a survey, the proportions of people positively answering some different items can be expressed as percentages. As the total amount is identified as 100, the compositional vector of D components can be defined using only D − 1 components, assuming that the remaining component is the percentage needed for the whole vector to add to 100. ==See also== Mixture model Response surface methodology Applications of simplices Ternary plot Bayes Space ==Notes== ==References== ==External links== CoDaWeb – Compositional Data Website Why, and How, Should Geologists Use Compositional Data Analysis (wikibook)

Text derived from https://en.wikipedia.org/w/index.php?oldid=1376500675 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001376500675 · captured 1790254025.0 · version history

Cite this page as: encyclopegia.org, “Compositional data”, snapshot enwiki-001376500675. https://encyclopegia.org/a/compositional-data