By default the basis of the clr-given by Egozcue et al., 2013 Build an isometric log-ratio basis for a composition with k+1 parts $$h_i = \sqrt{\frac{i}{i+1}} \log\frac{\sqrt[i]{\prod_{j=1}^i x_j}}{x_{i+1}}$$ for \(i \in 1\ldots k\).

ilr_basis(dim, type = "default")

olr_basis(dim, type = "default")

Arguments

dim

number of components

type

if different than `pivot` (pivot balances) or `cdp` (codapack balances) default balances are returned, which computes a triangular Helmert matrix as defined by Egozcue et al., 2013.

Value

matrix

Details

Modifying parameter type (pivot or cdp) other ilr/olr basis can be generated

References

Egozcue, J.J., Pawlowsky-Glahn, V., Mateu-Figueras, G. and Barceló-Vidal C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3) 279-300

Examples

ilr_basis(5)
#>          ilr1       ilr2       ilr3       ilr4
#> c1  0.7071068  0.4082483  0.2886751  0.2236068
#> c2 -0.7071068  0.4082483  0.2886751  0.2236068
#> c3  0.0000000 -0.8164966  0.2886751  0.2236068
#> c4  0.0000000  0.0000000 -0.8660254  0.2236068
#> c5  0.0000000  0.0000000  0.0000000 -0.8944272