Learn R Programming

Compositional (version 5.0)

The additive log-ratio transformation and its inverse: The additive log-ratio transformation and its inverse

Description

The additive log-ratio transformation and its inverse.

Usage

alr(x)
alrinv(y)

Arguments

x

A numerical matrix with the compositional data.

y

A numerical matrix with data to be closed into the simplex.

Value

A matrix with the alr transformed data (if alr is used) or with the compositional data (if the alrinv is used).

Details

The additive log-ratio transformation with the first component being the common divisor is applied. The inverse of this transformation is also available. This means that no zeros are allowed.

References

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

bc, pivot, fp, green, alfa, alfainv alfa.profile, alfa.tune

Examples

Run this code
# NOT RUN {
library(MASS)
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
y <- alr(x)
x1 <- alrinv(y)
# }

Run the code above in your browser using DataLab