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.
See also
Other compositional data analysis:
CoDA_2Group_H1(),
CoDA_Univariate()
Examples
data("Hongite", package = 'compositions')
samp = c(44, 20.4, 13.9, 9.1, 12.6)
CoDA_Atyp_Idx(Hongite)
#> New names:
#> • `` -> `...1`
#> # A tibble: 25 × 2
#> idx Atypical
#> <dbl> <chr>
#> 1 0.712 No
#> 2 0.0171 No
#> 3 0.199 No
#> 4 0.0318 No
#> 5 0.709 No
#> 6 0.828 No
#> 7 0.882 No
#> 8 0.969 Yes
#> 9 0.1 No
#> 10 0.987 Yes
#> # ℹ 15 more rows
CoDA_Atyp_Idx(Hongite, samp)
#> New names:
#> • `` -> `...1`
#> # A tibble: 1 × 2
#> idx Atypical
#> <dbl> <chr>
#> 1 0.998 Yes