R: The canonical basis in the clr plane used for ilr and ipt...

ilrBase {compositions} | R Documentation

## The canonical basis in the clr plane used for ilr and ipt transforms.

### Description

Compute the basis of a clr-plane, to use with isometric log-ratio or planar transform of a (dataset of) compositions.

### Usage

              ilrBase( x=NULL , z=NULL , D = NULL, method = "basic" )

### Arguments

`x` | optional dataset or vector of compositions
`z` | optional dataset or vector containing ilr or ipt coordinates
`D` | number of parts of the simplex
`method` | method to build the basis, one of "basic", "balanced", "optimal" "PBhclust", "PBmaxvar" or "PBangprox"

### Details

Method "basic" computes a triangular Helmert matrix (corresponding to the original ilr transformation defined by Egozcue et al, 2003). In this case, `ilrBase` is a wrapper catching the answers of `gsi.ilrBase` and is to be used as the more convenient function.

Method "balanced" returns an ilr matrix associated with a balanced partition, splitting the parts in groups as equal as possible. Transforms `ilr` and `ipt` computed with this basis are less affected by any component (as happens with "basic").

The following methods are all data-driven and will fail if `x` is not given. Some of these methods are extended to non-acomp datasets via the `cpt` general functionality. Use with care with non-acomp objects!

Method "optimal" is a wrapper to `gsi.optimalilrBase`, providing the ilr basis with less influence of missing values. It is computed as a hierarchical cluster of variables, with parts previously transformed to 1 (if the value is lost) or 0 (if it is recorded).

Methods "PBhclust", "PBmaxvar" and "PBangprox" are principal balance methods (i.e. balances approximating principal components in different ways). These are all resolved by calls to `gsi.PrinBal`. Principal balances functionality should be considered beta!

### Value

All methods give a matrix containing by columns the basis elements for the canonical basis of the clr-plane used for the ilr and ipt transform. Only one of the arguments `x`, `z` or `D` is needed to determine the dimension of the simplex.

### References

Egozcue J.J., V. Pawlowsky-Glahn, G. Mateu-Figueras and C. Barcel'o-Vidal (2003) Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3) 279-300

http://ima.udg.es/Activitats/CoDaWork03

### See Also

`clr`,`ilr`,`ipt`

### Examples

    ilr(c(1,2,3))
    ilrBase(D=2)
    ilrBase(c(1,2,3))
    ilrBase(z= ilr(c(1,2,3)) )
    round(ilrBase(D=7),digits= 3)
    ilrBase(D=7,method="basic")
    ilrBase(D=7,method="balanced")

[Package compositions version 1.40-3 Index]