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

cenLR

Centred logratio coefficients


Description

The centred logratio (clr) coefficients map D-part compositional data from the simplex into a D-dimensional real space.

Usage

cenLR(x, base = exp(1))

Arguments

x

multivariate data, ideally of class data.frame or matrix

base

a positive or complex number: the base with respect to which logarithms are computed. Defaults to exp(1).

Details

Each composition is divided by the geometric mean of its parts before the logarithm is taken.

Value

the resulting clr coefficients, including

x.clr

clr coefficients

gm

the geometric means of the original compositional data.

Note

The resulting data set is singular by definition.

Author(s)

Matthias Templ

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

data(expenditures)
eclr <- cenLR(expenditures)
inveclr <- cenLRinv(eclr)
head(expenditures)
head(inveclr)
head(pivotCoordInv(eclr$x.clr))

robCompositions

Compositional Data Analysis

v2.3.0
GPL (>= 2)
Authors
Matthias Templ [aut, cre] (<https://orcid.org/0000-0002-8638-5276>), Karel Hron [aut] (<https://orcid.org/0000-0002-1847-6598>), Peter Filzmoser [aut] (<https://orcid.org/0000-0002-8014-4682>), Kamila Facevicova [ctb], Petra Kynclova [ctb], Jan Walach [ctb], Veronika Pintar [ctb], Jiajia Chen [ctb], Dominika Miksova [ctb], Bernhard Meindl [ctb], Alessandra Menafoglio [ctb] (<https://orcid.org/0000-0003-0682-6412>), Alessia Di Blasi [ctb], Federico Pavone [ctb], Gianluca Zeni [ctb]
Initial release
2020-11-18

We don't support your browser anymore

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