Learn R Programming

robCompositions (version 1.3.2)

clr: centered log-ratio transformation

Description

The clr transformation opens compositional data into an unconstrained form in the real space.

Usage

clr(x)

Arguments

x
multivariate data ideally of class data.frame or matrix

Value

  • The transformed data, including
  • x.clrclr transformed data
  • gmthe geometric means of the original composition.

Details

The compositions divided by its geometric mean before the logarithm is taken.

References

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

See Also

invclr, alr, ilr, invalr, invilr

Examples

Run this code
data(expenditures)
eclr <- clr(expenditures)
inveclr <- invclr(eclr)
head(expenditures)
head(inveclr)
head(invclr(eclr$x.clr))

Run the code above in your browser using DataLab