Last chance! 50% off unlimited learning
Sale ends in
The additive log-ratio transformation and its inverse.
alr(x)
alrinv(y)
A numerical matrix with the compositional data.
A numerical matrix with data to be closed into the simplex.
A matrix with the alr transformed data (if alr is used) or with the compositional data (if the alrinv is used).
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.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
# 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