shipunov (version 1.13)

K: Coefficient of divergence

Description

Lubischew's coefficient of divergence (SSMD^2)

Usage

K(x, y=NULL, data=NULL, mad=FALSE, na.rm=TRUE)
# S3 method for K
print(x, ...)
# S3 method for K
summary(object, ..., num=2)

Arguments

x

Numeric vector, or formula, or object of the class 'K'

y

Second numeric vector, or nothing

data

Data with two columns (in case of formula)

mad

Non-parametric variant of K (not Lubischew's)

na.rm

Remove NAs?

object

Object of the class 'K'

num

Digits to round

...

Additional arguments

Value

K() returns value of K, or nothing. summary.K() returns also magnitude and P, "probability of misclassification".

Details

One of the effect size measures, Lubischew's K, coefficient of divergence (Lubischew, 1959). Interestingly, the recently invented "striclty standardized mean difference" SSMD (see, for example, "https://en.wikipedia.org/wiki/Strictly_standardized_mean_difference") is just a square root of K.

References

Lubischew A. A. 1959. How to apply biometry to systematics. Leningrad University Herald. N 9. P. 128--136. [In Russian, English abstract].

Examples

Run this code
# NOT RUN {
K(1:3, 2:100)
sapply(eq[, -1], function(.x) K(.x ~ eq[, 1]))
summary(K(x17 ~ Species, data=haltica), num=5)
# }

Run the code above in your browser using DataCamp Workspace