mvar()
computes the metric variance, i.e. a global measure of spread.msd()
computes the metric standard deviation.
Usage
mvar(x, ...)
msd(x, ...)
# S4 method for CompositionMatrix
mvar(x)
# S4 method for CompositionMatrix
msd(x)
Arguments
- x
A
CompositionMatrix
object.- ...
Currently not used.
Value
A numeric
vector.
References
Pawlowsky-Glahn, V. and Egozcue, J. J. (2001). Geometric Approach to Statistical Analysis on the Simplex. Stochastic Environmental Research and Risk Assessment, 15(5): 384-398. doi:10.1007/s004770100077 .
See also
Other statistics:
aggregate()
,
covariance()
,
dist()
,
mahalanobis()
,
mean()
,
variation()
Examples
## Coerce to compositional data
data("hongite")
coda <- as_composition(hongite)
## Mean
mean(coda)
#> A B C D E
#> 0.48941415 0.21966082 0.09881294 0.10405382 0.08805827
## Metric variance
mvar(coda)
#> [1] 1.691324
## Metric standard deviation
msd(coda)
#> [1] 0.6502546