Learn R Programming

provenance (version 4.4)

diss.distributional: 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 distributional
diss(x, method = NULL, log = FALSE, verbose = FALSE, ...)

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

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

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

Value

an object of class diss

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.

See Also

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

Examples

Run this code
data(Namib)
print(round(100*diss(Namib$DZ)))

Run the code above in your browser using DataLab