Learn R Programming

robCompositions (version 1.3.2)

invalr: additive logistic transformaton

Description

Inverse additive log-ratio transformation, often called as additive logistic transformation.

Usage

invalr(x, cnames = NULL, ivar = NULL, useClassInfo = TRUE)

Arguments

x
data set, object of class alr, matrix or data.frame
cnames
column names. If the object is of class alr the column names are chosen from therein.
ivar
index of the rationing variable. If the object is of class alr the column names are chosen from therein. If not and ivar is not provided by the user, it is assumed that the rationing variable was the last column of the data in the simple
useClassInfo
if FALSE, the class information of object x is not used.

Value

  • the transformed data matrix

Details

The function allows also to preserve absolute values when class info is provided. Otherwise only the relative information is preserved.

References

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

See Also

invilr, alr

Examples

Run this code
data(arcticLake)
x <- arcticLake
x.alr <- alr(x, 2)
y <- invalr(x.alr)
## This exactly fulfills:
invalr(alr(x, 3))
data(expenditures)
x <- expenditures
y <- invalr(alr(x, 5))
head(x)
head(y)
## --> absolute values are preserved as well.

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

Run the code above in your browser using DataLab