lcor {lancor} | R Documentation |
Lancaster correlation
Description
Computes the Lancaster correlation coefficient.
Usage
lcor(x, y = NULL, type = c("rank", "linear"))
Arguments
x |
a numeric vector, or a matrix or data frame with two columns. |
y |
NULL (default) or a vector with same length as x. |
type |
a character string indicating which lancaster correlation is to be computed. One of "rank" (default), or "linear": can be abbreviated. |
Value
lcor
returns the sample Lancaster correlation.
Author(s)
Hajo Holzmann, Bernhard Klar
References
Holzmann, Klar (2024) Lancester correlation - a new dependence measure linked to maximum correlation. arXiv:2303.17872
See Also
Examples
Sigma <- matrix(c(1,0.1,0.1,1), ncol=2)
R <- chol(Sigma)
n <- 1000
x <- matrix(rnorm(n*2), n)
lcor(x, type = "rank")
lcor(x, type = "linear")
x <- matrix(rnorm(n*2), n)
nu <- 2
y <- x / sqrt(rchisq(n, nu)/nu)
cor(y[,1], y[,2], method = "spearman")
lcor(y, type = "rank")
[Package lancor version 0.1.2 Index]