Estimating location and scatter parameters for compositional data | R Documentation |

Estimating location and scatter parameters for compositional data in a robust and non robust way.

comp.den(x, type = "alr", dist = "normal", tol = 1e-07)

`x` |
A matrix containing compositional data. No zero values are allowed. |

`type` |
A boolean variable indicating the transformation to be used. Either "alr" or "ilr" corresponding to the additive or the isometric log-ratio transformation respectively. |

`dist` |
Takes values "normal", "t", "skewnorm", "rob" and "spatial". They first three options correspond to the parameters of the normal, t and skew normal distribution respectively. If it set to "rob" the MCD estimates are computed and if set to "spatial" the spatial median and spatial sign covariance matrix are computed. |

`tol` |
A tolerance level to terminate the process of finding the spatial median when dist = "spatial". This is set to 1e-09 by default. |

This function calculates robust and non robust estimates of location and scatter.

A list including: The mean vector and covariance matrix mainly. Other parameters are also returned depending on the value of the argument "dist".

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

P. J. Rousseeuw and K. van Driessen (1999) A fast algorithm for the minimum covariance determinant estimator. Technometrics 41, 212-223.

Mardia K.V., Kent J.T., and Bibby J.M. (1979). Multivariate analysis. Academic press.

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

T. Karkkaminen and S. Ayramo (2005). On computation of spatial median for robust data mining. Evolutionary and Deterministic Methods for Design, Optimization and Control with Applications to Industrial and Societal Problems EUROGEN 2005.

A Durre, D Vogel, DE Tyler (2014). The spatial sign covariance matrix with unknown location. Journal of Multivariate Analysis, 130: 107-117.

J. T. Kent, D. E. Tyler and Y. Vardi (1994) A curious likelihood identity for the multivariate t-distribution. Communications in Statistics-Simulation and Computation 23, 441-453.

Azzalini A. and Dalla Valle A. (1996). The multivariate skew-normal distribution. Biometrika 83(4): 715-726.

```
spatmed.reg, multivt
```

library(MASS) x <- as.matrix(iris[, 1:4]) x <- x / rowSums(x) comp.den(x) comp.den(x, type = "alr", dist = "t") comp.den(x, type = "alr", dist = "spatial")

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.