clr {compositions} | R Documentation |
Compute the centered log ratio transform of a (dataset of) composition(s) and its inverse.
clr( x ) clr.inv( z )
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) |
The clr-transform maps a composition in the D-part Aitchison-simplex
isometrically to a D-1 dimensonal euclidian vector subspace: consequently, the
transformation is not injective and only yields vectors which elements
sum up to 0. 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) := (ln xi - mean(ln x_j)
The image of the clr
is given by the vectors with entries
summing to 0. This hyperplane is also called the clr-plane.
clr
gives the centered log ratio transform,
clr.inv
gives closed compositions with the given clr-transforms
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.
(tmp <- clr(c(1,2,3))) clr.inv(tmp) clr.inv(tmp) - clo(c(1,2,3)) # 0 data(Hydrochem) cdata <- Hydrochem[,6:19] pairs(clr(cdata))