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

Description Usage Arguments Details Value Note Author(s) References See Also Examples

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

1
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.

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.

Value

z

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

Note

xx may be a data frame or matrix, but must contains only parts, compositions, for the data set under study. This function should only be used for univariate investigations of a single part v1, it is inappropriate to use this transformation for multivariate studies, in which case use functions ilr or clr should be employed.

Note that the vector z is numerically equal to the clr transform for v1 in the data matrix xx times a constant sqrt(p/(p-1)), where p is the mumber of parts in the matrix xx.

Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df.

Any rows containing NAs in the data will be removed prior to undertaking the transformation.

Author(s)

Robert G. Garrett

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

1
2
3
4
5
6
7
8
9
## Make test data sind available
data(sind.mat2open)

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

## Clean-up
rm(temp)

Example output

Loading required package: MASS
Loading required package: fastICA
       N01        N02        N03        N04        N05        N06        N07 
-2.0217632 -1.8383321 -2.0464144 -1.7933294 -1.6233927 -1.9555900 -1.8749885 
       N08        N09        N10        N11        N12        N13        N14 
-2.0011622 -1.1335095 -2.2710027 -1.6201409 -1.0550167  0.5539622 -1.4878020 
       N15        N16        N17        N18        N19        N20        N21 
 0.8501121  1.0951202 -2.3191190 -2.1815230 -2.1953756 -1.5490003 -1.0828429 
       N22        N23        N24        N25 
-1.9677272 -1.9782456 -1.8512226 -1.8192240 

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to gx.ilr in rgr...