Learn R Programming

robCompositions (version 2.4.1)

variation: Robust and classical variation matrix

Description

Estimates the variation matrix with robust methods.

Usage

variation(x, method = "robustPivot", algorithm = "MCD")

Value

The (robust) variation matrix.

Arguments

x

data frame or matrix with positive entries

method

method used for estimating covariances. See details.

algorithm

kind of robust estimator (MCD or MM)

Author

Karel Hron, Matthias Templ

Details

The variation matrix is estimated for a given compositional data set. Instead of using the classical standard deviations the miniminm covariance estimator is used (covMcd) is used when parameter robust is set to TRUE.

For method robustPivot forumala 5.8. of the book (see second reference) is used. Here robust (mcd-based) covariance estimation is done on pivot coordinates. Method robustPairwise uses a mcd covariance estimation on pairwise log-ratios. Methods Pivot (see second reference) and Pairwise (see first reference) are the non-robust counterparts. Naturally, Pivot and Pairwise gives the same results, but the computational time is much less for method Pairwise.

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman and Hall Ltd., London (UK). 416p.

#' Filzmoser, P., Hron, K., Templ, M. (2018) Applied Compositional Data Analysis. Springer, Cham.

Examples

Run this code

data(expenditures)
variation(expenditures) # default is method "robustPivot"
variation(expenditures, method = "Pivot")
variation(expenditures, method = "robustPairwise")
variation(expenditures, method = "Pairwise") # same results as Pivot

Run the code above in your browser using DataLab