powered by
Calculate difference measures using different metrics.
get_distance( cov0, cov1, metric = c("ovl", "ksd", "astd", "std", "abd", "ley", "mhb", "omkss") )
A real value of the distance.
Vector (or matrix for metric = "mhb") of samples from the first distribution.
metric = "mhb"
Vector (or matrix for metric = "mhb") of samples from the second distribution.
Metric to use for calculating the distance with options:
ovl
Overlapping area
ksd
Kullback-Leibler distance
astd
Standardized absolute mean difference
std
Standardized mean difference
abd
Absolute difference in means
ley
Levy distance
mhb
Mahalanobis distance
omkss
One minus Kolmogorov-Smirnov statistic
x <- rnorm(100, mean = 0, sd = 1) y <- rnorm(1000, mean = 1, sd = 2) get_distance(x, y, "ovl") get_distance(x, y, "abd")
Run the code above in your browser using DataLab