CoDa.FConstant
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.GConstant
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.HConstant
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.JConstant
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.AitchisonType
Aitchison()

Aitchison distance following the Distances.jl API.

CoDa.CoDaArrayType
CoDaArray(table)

Construct an array of compositional data from table.

CoDa.CompositionType
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.FMatrixType
FMatrix{T}

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

CoDa.GMatrixType
GMatrix{T}

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

CoDa.HMatrixType
HMatrix{T}

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

CoDa.JMatrixType
JMatrix{T}

Square matrix of ones. See also J.

Base.randMethod
rand(Composition{D}, n=1)

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

CoDa.aitchisonMethod
aitchison(c₁, c₂)

Return the Aitchison distance between compositions c₁ and c₂.

CoDa.alrMethod
alr(c)

Additive log-ratio transformation of composition c.

CoDa.alrcovMethod
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.alrinvMethod
alrinv(x)

Inverse alr transformation of coordinates x.

CoDa.clrMethod
clr(c)

Centered log-ratio transformation of composition c.

CoDa.clrcovMethod
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.clrinvMethod
clrinv(x)

Inverse clr transformation of coordinates x.

CoDa.composeFunction
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.ilrMethod
ilr(c)

Isometric log-ratio transformation of composition c.

CoDa.ilrinvMethod
ilrinv(x)

Inverse ilr transformation of coordinates x.

CoDa.lrarrayMethod
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.partsMethod
parts(c)

Parts in the composition c.

CoDa.partsMethod
parts(array)

Parts in compositional array.

CoDa.smoothMethod
smooth(c, τ)

Add small value τ to all components of composition c in order to remove essential zeros.

CoDa.variationMethod
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.