Raw File
Additive log-ratio transformation
The additive log-ratio transformation moves D-part compositional data from the simplex into a (D-1)-dimensional real space.
addLR(x, ivar=ncol(x))
  \item{x}{D-part compositional data}
  \item{ivar}{Rationing part}
The compositional parts are divided by the rationing part before the logarithm is taken. 
A list of class \dQuote{alr} which includes the following content:
\item{x.alr}{the transformed data}
\item{varx}{the rationing variable}
\item{ivar}{the index of the rationing variable, indicating the column number of the rationing variable in the data matrix \emph{x}}
\item{cnames}{the column names of \emph{x}}
The additional information such as \emph{cnames} or \emph{ivar} is usefull when a back-transformation is applied on the \sQuote{same} data set.
Aitchison, J. (1986) \emph{The Statistical Analysis of Compositional
Data} Monographs on Statistics and Applied Probability. Chapman \&
Hall Ltd., London (UK). 416p.
Matthias Templ
\code{\link{addLRinv}}, \code{\link{isomLR}}, \code{\link[compositions]{alr}}
x <- arcticLake
x.alr <- addLR(x, 2)
y <- addLRinv(x.alr)
## This exactly fulfills:
addLRinv(addLR(x, 3))
x <- expenditures
y <- addLRinv(addLR(x, 5))
## --> absolute values are preserved as well.

## preserve only the ratios:
addLRinv(x.alr, ivar=2, useClassInfo=FALSE)

\keyword{ manip }
back to top