`CoDa.F`

— Constant```
F
F(d)
```

User interface for `FMatrix`

, as defined by Aitchison.

`F`

is a `d`

by `D`

matrix that can be defined as

`F[i, j] = 1`

, if `i==j`

`F[i, j] = -1`

, if `j==D`

`F[i, j] = 0`

, otherwise

**Examples**

```
julia> F(3)
julia> F*v
julia> v'*F
```

`CoDa.G`

— Constant```
G
G(D)
```

User interface for `GMatrix`

, as defined by Aitchison.

`G`

is an `D`

by `D`

matrix that can be defined as

`G[i, j] = I[i, j] - J[i, j] / D`

**Examples**

```
julia> G(3)
julia> G*v
julia> v'*G
```

`CoDa.H`

— Constant```
H
H(d)
```

User interface for `HMatrix`

, as defined by Aitchison.

`H`

is a `d`

by `d`

matrix that can be defined as

`H[i, j] = I[i, j] + J[i, j]`

**Examples**

```
julia> H(3)
julia> H*v
julia> v'*H
```

`CoDa.J`

— Constant```
J
J(d)
```

User interface for `JMatrix`

, a `d`

by `d`

matrix of ones.

**Examples**

```
julia> J(3)
julia> J*v
julia> v'*J
```

`CoDa.Aitchison`

— Type`Aitchison()`

Aitchison distance following the Distances.jl API.

`CoDa.CoDaArray`

— Type`CoDaArray(table)`

Construct an array of compositional data from `table`

.

`CoDa.Composition`

— Type```
Composition(partscomps)
Composition(parts, comps)
Composition(part₁=comp₁, part₂=part₂, ...)
Composition(comps)
Composition(comp₁, comp₂, ...)
```

A D-part composition as defined by Aitchison 1986.

**Examples**

A 2-part composition with parts `a=0.1`

and `b=0.8`

:

```
julia> Composition(a=0.2, b=0.8)
julia> Composition((a=0.2, b=0.8))
julia> Composition((:a, :b), (0.2, 0.8))
```

When the names of the parts are not specified, the constructor uses default names `w1`

, `w2`

, ..., `wD`

:

```
julia> Composition(0.1, 0.8)
julia> Composition((0.1, 0.8))
```

`CoDa.FMatrix`

— Type`FMatrix{T}`

`F`

matrix, as defined by Aitchison 1986. See also `F`

.

`CoDa.F′Matrix`

— Type`F′Matrix{T}`

Lazy adjoint of `FMatrix{T}`

.

`CoDa.GMatrix`

— Type`GMatrix{T}`

`G`

matrix, as defined by Aitchison 1986. See also `G`

.

`CoDa.HMatrix`

— Type`HMatrix{T}`

`H`

matrix, as defined by Aitchison 1986. See also `H`

.

`CoDa.H⁻¹Matrix`

— Type`H⁻¹Matrix{T}`

Lazy inverse of `HMatrix{T}`

.

`CoDa.JMatrix`

— Type`JMatrix{T}`

Square matrix of ones. See also `J`

.

`Base.rand`

— Method`rand(Composition{D}, n=1)`

Generates `D`

-part composition at random according to a balanced Dirichlet distribution.

`CoDa.aitchison`

— Method`aitchison(c₁, c₂)`

Return the Aitchison distance between compositions `c₁`

and `c₂`

.

`CoDa.alr`

— Method`alr(c)`

Additive log-ratio transformation of composition `c`

.

`CoDa.alrcov`

— Method`alrcov(table)`

Return the log-ratio covariance matrix `Σ`

of the `table`

such that:

`Σ[i,j] = cov(log(x[i]/x[D]), log(x[j]/x[D]))`

for`i, j = 1, ..., d`

`CoDa.alrinv`

— Method`alrinv(x)`

Inverse alr transformation of coordinates `x`

.

`CoDa.clr`

— Method`clr(c)`

Centered log-ratio transformation of composition `c`

.

`CoDa.clrcov`

— Method`clrcov(table)`

Return the centered log-ratio covariance matrix `Γ`

of the `table`

such that:

`Γ[i,j] = cov(log(x[i]/g(x)), log(x[j]/g(x)))`

for`i, j = 1, ..., D`

,

where `g(x)`

is the geometric mean.

`CoDa.clrinv`

— Method`clrinv(x)`

Inverse clr transformation of coordinates `x`

.

`CoDa.components`

— Method`components(c)`

Components in the composition `c`

.

`CoDa.compose`

— Function`compose(table, colnames; keepcols=true, as=:CODA)`

Convert columns `colnames`

of `table`

into parts of a composition and save the result in a `CoDaArray`

. If `keepcols`

is set to `true`

, then save the result `as`

a column in a new table with all other columns preserved.

`CoDa.ilr`

— Method`ilr(c)`

Isometric log-ratio transformation of composition `c`

.

`CoDa.ilrinv`

— Method`ilrinv(x)`

Inverse ilr transformation of coordinates `x`

.

`CoDa.lrarray`

— Method`lrarray(table)`

Return the variation array `A`

of the `table`

such that:

`A[i,j] = E[log(x[i]/x[j])]`

for`i > j`

`A[i,j] = Var(log(x[i]/x[j]))`

for`i < j`

`A[i,j] = 0`

for`i = j`

`CoDa.parts`

— Method`parts(c)`

Parts in the composition `c`

.

`CoDa.parts`

— Method`parts(array)`

Parts in compositional `array`

.

`CoDa.smooth`

— Method`smooth(c, τ)`

Add small value `τ`

to all components of composition `c`

in order to remove essential zeros.

`CoDa.variation`

— Method`variation(table)`

Return the variation matrix `Τ`

of the `table`

such that:

`Τ[i,j] = Var(log(x[i]/x[j]))`

for`i, j = 1, ..., D`

`CoDa.𝒞`

— Method`𝒞(x)`

Return closure of `x`

.