alr_basis: Additive log-ratio basis

View source: R/basis.R

alr_basisR Documentation

Additive log-ratio basis

Description

Construct the transformation matrix associated with additive log-ratio (alr) coordinates.

Usage

alr_basis(dim, denominator = NULL, numerator = NULL)

Arguments

dim

Number of parts. It can be a single integer, a matrix or data frame, or a character vector of part names.

denominator

Part used as denominator. By default, the last part is used.

numerator

Parts used as numerators. By default, all parts except the denominator are used, preserving their original order.

Value

A matrix defining the alr coordinate system.

References

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

Examples

alr_basis(5)
alr_basis(5, 3)
alr_basis(5, 3, c(1, 5, 2, 4))


coda.base documentation built on March 4, 2026, 9:06 a.m.