Skip to contents

Compositional Mean

Usage

# S4 method for class 'CompositionMatrix'
mean(x, ...)

Arguments

x

A CompositionMatrix object.

...

Further arguments to be passed to internal methods.

Value

A numeric vector.

Details

Closed vector of the columns geometric means.

References

Aitchison, J. (1986). The Statistical Analysis of Compositional Data. London: Chapman and Hall, p. 64-91.

See also

Author

N. Frerebeau

Examples

## Data from Aitchison 1986
data("hongite")

## Coerce to compositional data
coda <- as_composition(hongite)

## Mean
mean(coda)
#>          A          B          C          D          E 
#> 0.48941415 0.21966082 0.09881294 0.10405382 0.08805827 

## Quantile
quantile(coda)
#>          A         B     C     D     E
#> 0%   0.323 0.0520000 0.007 0.055 0.037
#> 25%  0.423 0.1290000 0.038 0.083 0.065
#> 50%  0.452 0.2380000 0.097 0.095 0.085
#> 75%  0.486 0.3233233 0.234 0.109 0.098
#> 100% 0.523 0.4660000 0.429 0.158 0.132