diss: Calculate the dissimilarity matrix between two datasets of...

diss.distributionalR Documentation

Calculate the dissimilarity matrix between two datasets of class distributional, compositional, counts or varietal

Description

Calculate the dissimilarity matrix between two datasets of class distributional or compositional using the Kolmogorov-Smirnov, Sircombe-Hazelton, Aitchison or Bray-Curtis distance

Usage

## S3 method for class 'distributional'
diss(x, method = NULL, log = FALSE, verbose = FALSE, ...)

## S3 method for class 'compositional'
diss(x, method = NULL, ...)

## S3 method for class 'counts'
diss(x, method = NULL, ...)

## S3 method for class 'varietal'
diss(x, method = NULL, ...)

Arguments

x

an object of class distributional, compositional or counts

method

if x has class distributional: either "KS", "Wasserstein", "Kuiper" or "SH";

if x has class compositional: either "aitchison" or "bray";

if x has class counts: either "chisq" or "bray";

if x has class varietal: either "KS", "W2_1D" or "W2".

log

logical. If TRUE, subjects the distributional data to a logarithmic transformation before calculating the Wasserstein distance.

verbose

logical. If TRUE, gives progress updates during the construction of the dissimilarity matrix.

...

optional arguments

Details

"KS" stands for the Kolmogorov-Smirnov statistic, "W2_1D" for the 1-dimensional Wasserstein-2 distance, "Kuiper" for the Kuiper statistic, "SH" for the Sircombe-Hazelton distance, "aitchison" for the Aitchison logratio distance, "bray" for the Bray-Curtis distance, "chisq" for the Chi-square distance, and "W2" for the 2-dimensional Wasserstein-2 distance.

Value

an object of class diss

See Also

KS.diss bray.diss SH.diss Wasserstein.diss Kuiper.diss

Examples

data(Namib)
print(round(100*diss(Namib$DZ)))

provenance documentation built on Aug. 28, 2023, 5:07 p.m.