Learn R Programming

nexus (version 0.3.0)

transform_lr: Pairwise Log-Ratios (LR)

Description

Computes all pairwise log-ratio transformation.

Usage

transform_lr(object, ...)

# S4 method for CompositionMatrix transform_lr(object, weights = FALSE)

Value

A LR object.

Arguments

object

A CompositionMatrix object.

...

Currently not used.

weights

A logical scalar: should varying weights (column means) be computed? If FALSE (the default), equally-weighted parts are used. Alternatively, a positive numeric vector of weights can be specified (will be rescaled to sum to \(1\)). Weights will be used internally by other methods (e.g. variance()).

Author

N. Frerebeau

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. tools:::Rd_expr_doi("10.1146/annurev-statistics-042720-124436").

See Also

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

Examples

Run this code
## Data from Aitchison 1986
data("hongite")

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

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

Run the code above in your browser using DataLab