Computes all pairwise log-ratio transformation.

Usage

transform_lr(object, ...)

# S4 method for CompositionMatrix
transform_lr(object)

Arguments

object

A CompositionMatrix object.

...

Currently not used.

Value

A LR object.

References

Aitchison, J. (1986). The Statistical Analysis of Compositional Data. London: Chapman and Hall.

Greenacre, M. J. (2019). Compositional Data Analysis in Practice. Boca Raton: CRC Press.

Greenacre, M. J. (2021). Compositional Data Analysis. Annual Review of Statistics and Its Application, 8(1): 271-299. doi:10.1146/annurev-statistics-042720-124436 .

Other log-ratio transformations: transform_alr(), transform_clr(), transform_ilr(), transform_inverse(), transform_plr()

N. Frerebeau

Examples

## Data from Aitchison 1986
data("hongite")

## Coerce to compositional data
coda <- as_composition(hongite)

## Pairwise log-ratio
lr <- transform_lr(coda)

## Centered log-ratio
clr <- transform_clr(coda)

alr <- transform_alr(coda)

## Isometric log-ratio
ilr <- transform_ilr(coda)
plr <- transform_plr(coda)

## Inverse transformation
inv_clr <- transform_inverse(clr)
all.equal(coda, inv_clr)
#> [1] TRUE

inv_alr <- transform_inverse(alr)
all.equal(coda, inv_alr)
#> [1] TRUE

inv_ilr <- transform_inverse(ilr)
all.equal(coda, inv_ilr)
#> [1] TRUE

inv_plr <- transform_inverse(plr)
all.equal(coda, inv_plr)
#> [1] TRUE