Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Compositional data
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Parts of a whole which carry only relative information}} In [[statistics]], '''compositional data''' are quantitative descriptions of the parts of some whole, conveying relative information. Mathematically, compositional data is [[sample space|represented by points]] on a [[simplex]]. Measurements involving probabilities, proportions, percentages, and [[Parts-per notation|ppm]] can all be thought of as compositional data. ==Ternary plot== Compositional data in three variables can be plotted via [[ternary plot]]s. The use of a [[barycentric coordinates (mathematics)|barycentric]] [[plot (graphics)|plot]] on three variables graphically depicts the ratios of the three variables as positions in an [[equilateral]] [[triangle]]. ==Simplicial sample space== In general, [[John Aitchison]] defined compositional data to be proportions of some whole in 1982.<ref>{{cite journal|last=Aitchison|first=John|title=The Statistical Analysis of Compositional Data|journal=Journal of the Royal Statistical Society. Series B (Methodological)|volume=44|issue=2|year=1982|pages=139–177|doi=10.1111/j.2517-6161.1982.tb01195.x}}</ref> 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: :: <math> \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\}. \ </math> [[File:Aitchison-simplex.jpg|thumb|An illustration of the Aitchison simplex. Here, there are 3 parts, <math>x_1, x_2, x_3</math> represent values of different proportions. A, B, C, D and E are 5 different compositions within the simplex. A, B and C are all equivalent and D and E are equivalent.]] 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. <math>\kappa = 1</math>. In this context, normalization to the standard simplex is called '''closure''' and is denoted by <math>\scriptstyle\mathcal{C}[\,\cdot\,]</math>: :: <math>\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],\ </math> where ''D'' is the number of parts (components) and <math> [\cdot]</math> denotes a row vector. == Aitchison geometry == The simplex can be given the structure of a [[vector space]] in several different ways. The following vector space structure is called '''Aitchison geometry''' or the '''Aitchison simplex''' and has the following operations: ; Perturbation (vector addition) :: <math> 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 </math> ; Powering (scalar multiplication) :: <math> \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} </math> ; Inner product :: <math> \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</math> Endowed with those operations, the Aitchison simplex forms a <math>(D-1)</math>-dimensional Euclidean [[inner product space]]. The uniform composition <math>\left[\frac{1}{D}, \dots, \frac{1}{D}\right]</math> is the [[zero vector]]. === Orthonormal bases === Since the Aitchison simplex forms a finite dimensional Hilbert space, it is possible to construct orthonormal bases in the simplex. Every composition <math>x</math> can be decomposed as follows :: <math> x = \bigoplus_{i=1}^{D-1} x_i^* \odot e_i </math> where <math>e_1, \ldots, e_{D-1} </math> forms an orthonormal basis in the simplex.<ref>{{harvnb|Egozcue|Pawlowsky-Glahn|Mateu-Figueras|Barcelo-Vidal2003}}</ref> The values <math>x_i^*, i=1,2,\ldots,D-1</math> are the (orthonormal and Cartesian) coordinates of <math>x</math> with respect to the given basis. They are called isometric log-ratio coordinates <math>(\operatorname{ilr})</math>. === Linear transformations === There are three well-characterized [[isomorphism]]s that transform from the Aitchison simplex to real space. All of these transforms satisfy linearity and as given below ==== Additive log ratio transform ==== The additive log ratio (alr) transform is an isomorphism where <math>\operatorname{alr}: S^D \rightarrow \mathbb{R}^{D-1} </math>. This is given by :: <math> \operatorname{alr}(x) = \left[ \log \frac{x_1}{x_D}, \cdots, \log \frac{x_{D-1}}{x_D} \right] </math> 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. ==== Center log ratio transform ==== The center log ratio (clr) transform is both an isomorphism and an isometry where <math>\operatorname{clr}: S^D \rightarrow U, \quad U \subset \mathbb{R}^D </math> :: <math> \operatorname{clr}(x) = \left[ \log \frac{x_1}{g(x)}, \cdots, \log \frac{x_D}{g(x)} \right] </math> Where <math> g(x) </math> is the geometric mean of <math> x </math>. The inverse of this function is also known as the [[softmax function]]. ==== Isometric logratio transform ==== The isometric log ratio (ilr) transform is both an isomorphism and an isometry where <math>\operatorname{ilr}: S^D \rightarrow \mathbb{R}^{D-1} </math> :: <math> \operatorname{ilr}(x) = \big[ \langle x, e_1 \rangle, \ldots, \langle x, e_{D-1} \rangle\big] </math> There are multiple ways to construct orthonormal bases, including using the [[Gram–Schmidt_process | Gram–Schmidt orthogonalization]] or [[singular-value decomposition]] of clr transformed data. Another alternative is to construct log contrasts from a bifurcating tree. If we are given a bifurcating tree, we can construct a basis from the internal nodes in the tree. [[File:Orthogonal-tree-basis.jpg|thumb|A representation of a tree in terms of its orthogonal components. l represents an internal node, an element of the orthonormal basis. This is a precursor to using the tree as a scaffold for the ilr transform]] Each vector in the basis would be determined as follows :: <math> e_\ell = C[\exp( \,\underbrace{0,\ldots,0}_k, \underbrace{a,\ldots,a}_r,\underbrace{b,\ldots,b}_s,\underbrace{0,\ldots,0}_t \, )] </math> The elements within each vector are given as follows :: <math> a = \frac{\sqrt{s}}{\sqrt{r(r+s)}} \quad \text{and} \quad b = \frac{-\sqrt{r}}{\sqrt{s(r+s)}} </math> where <math>k, r, s, t</math> are the respective number of tips in the corresponding subtrees shown in the figure. It can be shown that the resulting basis is orthonormal<ref>{{harvnb|Egozcue|Pawlowsky-Glahn|2005}}</ref> Once the basis <math>\Psi</math> is built, the ilr transform can be calculated as follows :: <math> \operatorname{ilr}(x) = \operatorname{clr}(x) \Psi^T </math> where each element in the ilr transformed data is of the following form :: <math> b_i = \sqrt{\frac{rs}{r+s}} \log \frac{g(x_R)}{g(x_S)} </math> where <math> x_R</math> and <math> x_S</math> are the set of values corresponding to the tips in the subtrees <math> R</math> and <math> S</math> ==Examples== * In [[chemistry]], compositions can be expressed as [[molar concentration]]s 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 [[DNA sequencing#High-throughput methods|high throughput 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.<ref>{{cite journal | last1 = Olea | first1 = Ricardo A. | last2 = Martín-Fernández | first2 = Josep A. | last3 = Craddock | first3 = William H. | year = 2021 | title = Multivariate classification of the crude oil petroleum systems in southeast Texas, USA, using conventional and compositional analysis of biomarkers | journal = In Advances in Compositional Data Analysis—Festschrift in honor of Vera-Pawlowsky-Glahn, Filzmoser, P., Hron, K., Palarea-Albaladejo, J., Martín-Fernández, J.A., editors. Springer | pages = 303−327}}</ref> * In a [[Survey (human research)|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]] * [[Simplex#Applications|Applications of simplices]] * [[Ternary plot]] ==Notes== {{reflist}} ==References== * {{citation |author-link=John Aitchison |first=J. |last=Aitchison |title=The Statistical Analysis of Compositional Data |date=2011 |orig-date=1986 |publisher=Springer |isbn=978-94-010-8324-9 |series=Monographs on statistics and applied probability}} * {{citation |first1=K. Gerald |last1=van den Boogaart |first2=Raimon |last2=Tolosana-Delgado |title=Analyzing Compositional Data with R |url=https://books.google.com/books?id=4VhEAAAAQBAJ |date=2013 |publisher=Springer |isbn=978-3-642-36809-7}} *{{citation | last1 = Egozcue | first1 = Juan Jose | last2 = Pawlowsky-Glahn | first2 = Vera | last3 = Mateu-Figueras | first3 = Gloria | last4 = Barcelo-Vidal | first4 = Carles | title = Isometric logratio transformations for compositional data analysis | journal = [[Mathematical Geology]] | volume=35 | number = 3 | pages = 279–300 | year = 2003 | doi = 10.1023/A:1023818214614 | s2cid = 122844634 }} *{{citation | last1 = Egozcue | first1 = Juan Jose | last2 = Pawlowsky-Glahn | first2 = Vera | title = Groups of parts and their balances in compositional data analysis | journal = [[Mathematical Geology]] | volume=37 | number = 7 | pages = 795–828 | year = 2005 | doi = 10.1007/s11004-005-7381-9 | bibcode = 2005MatGe..37..795E | s2cid = 53061345 }} *{{citation | last1 = Pawlowsky-Glahn | first1 = Vera | author1-link = Vera Pawlowsky-Glahn | last2 = Egozcue | first2 = Juan Jose | last3 = Tolosana-Delgado | first3 = Raimon | title = Modeling and Analysis of Compositional Data | publisher = Wiley | year = 2015 | doi = 10.1002/9781119003144 | isbn = 978-1-119-00314-4 }} ==External links== * [http://www.compositionaldata.com/ CoDaWeb – Compositional Data Website] * {{cite journal |hdl=10256/297 |hdl-access=free |last1=Pawlowsky-Glahn |first1=V. |last2=Egozcue |first2=J.J. |last3=Tolosana-Delgado |first3=R. |year=2007 |title=Lecture Notes on Compositional Data Analysis |website=Universitat de Girona |url=https://hdl.handle.net/10256/297}} * [[Wikibooks:Why, and How, Should Geologists Use Compositional Data Analysis|Why, and How, Should Geologists Use Compositional Data Analysis]] (wikibook) [[Category:Statistical data types]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation
(
edit
)
Template:Cite journal
(
edit
)
Template:Harvnb
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)