ilr_basis | R Documentation |
Builds an isometric log-ratio (ilr) basis for a composition with k+1
parts, also called orthonormal log-ratio (olr) basis.
ilr_basis(dim, type = "default")
olr_basis(dim, type = "default")
dim |
An integer indicating the number of components. If a dataframe or matrix is provided, the number of components is inferred from the number of columns. If a character vector specifying the names of the parts is provided the number of component is its length. |
type |
Character string specifying the type of basis to generate.
Options are |
The basis vectors are constructed as:
h_i = \sqrt{\frac{i}{i+1}} \log\frac{\sqrt[i]{\prod_{j=1}^i x_j}}{x_{i+1}}
for i = 1, \ldots, k
.
Setting the type
parameter to "pivot"
(pivot balances) or "cdp"
(codapack balances) allows generating alternative ilr/olr bases.
A matrix representing the orthonormal basis.
Egozcue, J.J., Pawlowsky-Glahn, V., Mateu-Figueras, G., & Barceló-Vidal, C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3), 279–300.
ilr_basis(5)
ilr_basis(alimentation[,1:9])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.