Learn R Programming

coda.base (version 0.5.5)

clr_basis: Centered log-ratio basis

Description

Compute the transformation matrix to express a composition using the linearly dependant centered log-ratio coordinates.

Usage

clr_basis(dim)

Value

matrix

Arguments

dim

number of parts

References

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

Examples

Run this code
(B <- clr_basis(5))
# CLR coordinates are linearly dependant coordinates.
(clr_coordinates <- coordinates(c(1,2,3,4,5), B))
# The sum of all coordinates equal to zero
sum(clr_coordinates) < 1e-15

Run the code above in your browser using DataLab