Variation Matrix
Computes the variation matrix (Aitchison 1986, definition 4.4). methods
variation(x, ...) ## S4 method for signature 'CompositionMatrix' variation(x)
x
: A CompositionMatrix
object....
: Currently not used.A matrix
.
## Data from Aitchison 1986 data("hongite") ## Coerce to compositional data coda <- as_composition(hongite) ## Variation matrix ## (Aitchison 1986, definition 4.4) (varia <- variation(coda)) ## Cluster dendrogram d <- as.dist(varia) h <- hclust(d, method = "ward.D2") plot(h) ## Heatmap stats::heatmap( varia, distfun = stats::as.dist, hclustfun = function(x) stats::hclust(x, method = "ward.D2"), symm = TRUE, scale = "none" )
Aitchison, J. (1986). The Statistical Analysis of Compositional Data. London: Chapman and Hall, p. 64-91.
Greenacre, M. J. (2019). Compositional Data Analysis in Practice. Boca Raton: CRC Press.
Other statistics: aggregate()
, condense()
, covariance()
, dist
, mahalanobis()
, margin()
, mean()
, pip()
, quantile()
, scale()
, variance()
, variance_total()
N. Frerebeau
Useful links