Learn R Programming

rgr (version 1.1.15)

gx.ilr: Isometric Log-Ratio (ilr) transformation

Description

Undertakes an isometric log-ratio transformation to remove the effects of closure in a data frame or matrix on a single part to support univariate investigations.

Usage

gx.ilr(xx, v1, ifwarn = FALSE)

Arguments

xx

a n by p matrix from which a single part, v1, is to be isometrically log-ratio transformed. It is essential that a single unit of measurement is used for all parts. Thus it may be required to convert, for example, determinations in percent to ppm (mg/kg) so that all measurements are in ppm prior to executing this function. Natural logarithms are used.

v1

the column index of the part to be ilr transformed.

ifwarn

set to FALSE to suppress the warningdisplay concerning all the data/parts being in the same units. The message can be displayed by setting ifwarn = TRUE.

Value

z

a vector z of length n of isometric log-ratios for part v1.

Details

Most analytical chemical data for major, minor and trace elements are of a closed form, i.e. for a physical individual sample they sum to a constant, whether it be percent, ppm (mg/kg), or some other units. It does not matter that only some components contributing to the constant sum are present in the matrix, the data are closed. As a result, as some elements increase in concentration others must decrease, this leads to correlation measures that do not reflect the true underlying relationships, see gx.symm.coords.r.

References

Aitchison, J. and Egozcue, J.J., 2005. Compositional data analysis; where are we and where should we be heading. Mathematical Geology, 37(7):829-850.

Filzmoser, P., Hron, K. and Reimann, C., 2009. Principal component analysis for compositional data with outliers. Environmetrics, 20(6):621-633.

Filzmoser, P., Hron, K. and Reimann, C., 2009. Univariate statistical analysis of environmental (compositional) data - problems and possibilities. Science of the Total Environment, 407:6100-6108.

See Also

ilr, ltdl.fix.df

Examples

Run this code
# NOT RUN {
## Make test data sind available
data(sind.mat2open)

## Undertake ilr transform
temp <- gx.ilr(sind.mat2open, 5)
temp

## Clean-up
rm(temp)
# }

Run the code above in your browser using DataLab