Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

clr

Centered log ratio transform


Description

Compute the centered log ratio transform of a (dataset of) composition(s) and its inverse.

Usage

clr( x,... )
          clrInv( z,..., orig=gsi.orig(z) )

Arguments

x

a composition or a data matrix of compositions, not necessarily closed

z

the clr-transform of a composition or a data matrix of clr-transforms of compositions, not necessarily centered (i.e. summing up to zero)

...

for generic use only

orig

a compositional object which should be mimicked by the inverse transformation. It is especially used to reconstruct the names of the parts.

Details

The clr-transform maps a composition in the D-part Aitchison-simplex isometrically to a D-dimensonal euclidian vector subspace: consequently, the transformation is not injective. Thus resulting covariance matrices are always singular.
The data can then be analysed in this transformation by all classical multivariate analysis tools not relying on a full rank of the covariance. See ilr and alr for alternatives. The interpretation of the results is relatively easy since the relation between each original part and a transformed variable is preserved.
The centered logratio transform is given by

clr(x) := (\emph{ln} \bold{x} - mean(\emph{ln} \bold{x}) )

The image of the clr is a vector with entries summing to 0. This hyperplane is also called the clr-plane.

Value

clr gives the centered log ratio transform, clrInv gives closed compositions with the given clr-transform

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data, Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.

See Also

Examples

(tmp <- clr(c(1,2,3)))
clrInv(tmp)
clrInv(tmp) - clo(c(1,2,3)) # 0
data(Hydrochem)
cdata <- Hydrochem[,6:19]
pairs(clr(cdata),pch=".")

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.