Last chance! 50% off unlimited learning
Sale ends in
Compute the additive log ratio transform of a (dataset of) composition(s), and its inverse.
alr( x ,ivar=ncol(x), ... )
alrInv( z, ...,orig=gsi.orig(z))
alr
gives the additive log ratio transform; accepts a compositional dataset
alrInv
gives a closed composition with the given alr-transform; accepts a dataset
a composition, not necessarily closed
the alr-transform of a composition, thus a (D-1)-dimensional real vector
generic arguments. not used.
a compositional object which should be mimicked by the inverse transformation. It is especially used to reconstruct the names of the parts.
The column to be used as denominator variable. Unfortunately not yet supported in alrInv. The default works even if x is a vector.
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
The alr-transform maps a composition in the D-part Aitchison-simplex
non-isometrically to a D-1 dimensonal euclidian vector, treating the
last part as common denominator of the others. The data can then
be analysed in this transformation by all classical multivariate
analysis tools not relying on a distance. The interpretation of
the results is relatively simple, since the relation to the original D-1
first parts is preserved. However distance is an extremely relevant
concept in most types of analysis, where a clr
or
ilr
transformation should be preferred.
The additive logratio transform is given by
Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.
clr
,ilr
,apt
,
https://ima.udg.edu/Activitats/CoDaWork03/
(tmp <- alr(c(1,2,3)))
alrInv(tmp)
unclass(alrInv(tmp)) - clo(c(1,2,3)) # 0
data(Hydrochem)
cdata <- Hydrochem[,6:19]
pairs(alr(cdata),pch=".")
Run the code above in your browser using DataLab