Learn R Programming

shipunov (version 1.0)

K: Coefficient of divergence

Description

Lyubishchev'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 Lyubishchev's)

na.rm

Remove NAs?

object

Object of the class 'K'

num

Digits to round

...

Additional arguments

Value

Value of K, or nothing.

Details

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

References

Lyubishchev 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)
eq2 <- read.table("http://ashipunov.info/data/eq.txt", h=TRUE)
sapply(eq2[, -1], function(.x) K(.x ~ eq2[, 1]))
# }

Run the code above in your browser using DataLab