diss | R Documentation |
Calculates the pairwise dissimilarity between detrital age distributions, using either the Wasserstein-2 or Kolmogorov-Smirnov distance.
diss(x, ...)
## Default S3 method:
diss(x, y, method = "KS", ...)
## S3 method for class 'detritals'
diss(x, method = "W2", ...)
x |
an object of class |
... |
extra arguments (not used) |
y |
a vector of numbers |
method |
either |
The Kolmogorov-Smirnov statistic is the maximum vertical difference between two empirical cumulative distribution functions. The Wasserstein distance is a function of the area between them. Both dissimilarity measures are useful for multidimensional scaling.
an object of class dist
.
Written by Pieter Vermeesch, using modified code from
Mathieu Vrac's CDFt
package (KolmogorovSmirnov
function), and Dominic Schuhmacher's transport
package
(transport1d
function).
mds
d <- diss(examples$DZ,method='KS')
mds(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.