View source: R/CoDA_Atyp_Idx.R
CoDA_Atyp_Idx | R Documentation |
Calculates the atypicality index (ranges between 0 and 1, 1 being more atypical/different) for all the observations of a composition or compares one sample to the given composition, using Compositional Data Analysis (CoDA) principles.
CoDA_Atyp_Idx(comp, sample = NULL, thres = 0.95)
comp |
A matrix or data frame of observations for a given composition. Entries must be non-zero and positive. |
sample |
A one sample vector to compare against the given composition. |
thres |
Threshold to classify observation as atypical, from 0 to 1 (Default is 0.95) |
A matrix with the atypicality index or indices.
Aitchison, J. (1986). The statistical analysis of compositional data. Chapman and Hall.
data("Hongite", package = 'compositions') samp = c(44, 20.4, 13.9, 9.1, 12.6) CoDA_Atyp_Idx(Hongite) CoDA_Atyp_Idx(Hongite, samp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.