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

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

View source: R/compositions.R

Description

Compute the centered log ratio transform of a (dataset of) from 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. For bilinear forms, transform between variation-form from clr-form.

Usage

1
2
3
4
5
6
7
8
9
clr2ilr( x , V=ilrBase(x=x) )
ilr2clr( z , V=ilrBase(z=z), x=gsi.orig(z) )
clrvar2ilr( varx , V=ilrBase(D=ncol(varx)) )
ilrvar2clr( varz , V=ilrBase(D=ncol(varz)+1) ,x=NULL)
clrvar2variation(Sigma)
variation2clrvar(TT)
is.clrvar(M, tol=1e-10)
is.ilrvar(M, tol=1e-10)
          

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, Sigma

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

TT

variation matrix

M

a matrix, to check if it is a valid variance

tol

tolerance for the check

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 and clrvar2variation give the variance-/covariance-matrix of the clr/cpt transform of the same compositional data set.
variation2clrvar gives the variation matrix from the clr-covariance matrix
is.*var check if the given matrix satisfies the conditions to be an ilr-variance resp. a clr-variance

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

variation, ilr, ipt, clr, cpt

Examples

1
2
3
4
5
6
7

compositions documentation built on Jan. 5, 2022, 5:09 p.m.