R: Convert between clr and ilr, and between cpt and ipt.

clr2ilr {compositions} | R Documentation

## Convert between clr and ilr, and between cpt and ipt.

### Description

Compute the centered log ratio transform of a (dataset of) isometric log-ratio transform(s) and its inverse. Equivalently, compute centered and isometric planar transforms from each other. Acts in vectors and in bilinear forms.

### Usage

    clr2ilr( x , V=ilrBase(x) )
    ilr2clr( z , V=ilrBase(z=z),x=NULL )
    clrvar2ilr( varx , V=ilrBase(D=ncol(varx)) )
    ilrvar2clr( varz , V=ilrBase(D=ncol(varz)+1) ,x=NULL)

### Arguments

`x` | the clr/cpt-transform of composition(s) (in the ilr2-routines provided only to give column names.)
`z` | the ilr/ipt-transform of composition(s)
`varx` | variance or covariance matrix of clr/cpt-transformed compositions
`varz` | variance or covariance matrix of ilr/ipt-transformed compositions
`V` | a matrix with columns giving the chosen basis of the clr-plane

### Details

These functions perform a matrix multiplication with `V` in an appropriate way.

### Value

`clr2ilr` gives the ilr/ipt transform of the same composition(s),
`ilr2clr` gives the clr/cpt transform of the same composition(s),
`clrvar2ilr` gives the variance-/covariance-matrix of the ilr/ipt transform of the same compositional data set,
`ilrvar2clr` gives the variance-/covariance-matrix of the clr/cpt transform of the same compositional data set.

### Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

### 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
Aitchison, J, C. Barcel'o-Vidal, J.J. Egozcue, V. Pawlowsky-Glahn (2002) A consise guide to the algebraic geometric structure of the simplex, the sample space for compositional data analysis, Terra Nostra, Schriften der Alfred Wegener-Stiftung, 03/2003

### See Also

`ilr`, `ipt`

### Examples

    data(SimulatedAmounts)
    ilrInv(clr2ilr(clr(sa.lognormals)))-clo(sa.lognormals)
    clrInv(ilr2clr(ilr(sa.lognormals)))-clo(sa.lognormals)
    ilrvar2clr(var(ilr(sa.lognormals)))-var(clr(sa.lognormals))
    clrvar2ilr(var(cpt(sa.lognormals)))-var(ipt(sa.lognormals))

[Package compositions version 1.40-3 Index]