lcor.test: Lancaster correlation test

View source: R/lcor.test.R

lcor.testR Documentation

Lancaster correlation test

Description

Lancaster correlation test of bivariate independence. Lancaster correlation is a bivariate measures of dependence.

Usage

lcor.test(
  x,
  y = NULL,
  type = c("rank", "linear"),
  nperm = 999,
  method = c("permutation", "asymptotic", "symmetric")
)

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.

nperm

number of permutations.

method

a character string indicating how the p-value is computed if type ="linear". One of "permutation" (default), "asymptotic" or "symmetric": can be abbreviated.

Details

For more details on the testing procedure see Remark \, 2 in Holzmann, Klar (2024).

Value

A list containing the following components:

lcor

the value of the test statistic

pval

the p-value of the test

Author(s)

Hajo Holzmann, Bernhard Klar

References

Holzmann, Klar (2024). "Lancester correlation - a new dependence measure linked to maximum correlation". \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1111/sjos.12733")}

See Also

lcor, lcor.comp, lcor.ci and for for performing an ACE permutation test of independence see acepack (https://cran.r-project.org/package=acepack).

Examples

n <- 200
x <- matrix(rnorm(n*2), n)
nu <- 2
y <- x / sqrt(rchisq(n, nu)/nu)
cor.test(y[,1], y[,2], method = "spearman")
lcor.test(y, type = "rank")


lancor documentation built on Aug. 22, 2025, 9:16 a.m.