Learn R Programming

XICOR (version 0.3.3)

calculateXI: Compute the cross rank coefficient xi on two vectors.

Description

This function computes the xi coefficient between two vectors x and y.

Usage

calculateXI(xvec, yvec, simple = TRUE, seed = 12133331)

Value

In the case simple = TRUE, function returns the value of the xi coefficient, If simple = FALSE is chosen, the function returns a list:

fr

rearranged rank of yvec

CU

mean(gr*(1-gr))

Arguments

xvec

Vector of numeric values in the first coordinate.

yvec

Vector of numeric values in the second coordinate.

simple

Whether auxiliary information is kept to pass on.

seed

Ties are removed randomly, setting a seed ensures reproducibility.

Author

Sourav Chatterjee, Susan Holmes

References

Chatterjee, S. (2020) A New Coefficient Of Correlation, <arXiv:1909.10140>.

See Also

xicor

Examples

Run this code
# Compute one of the coefficients
library("psychTools")
data(peas)
calculateXI(peas$parent,peas$child)
calculateXI(peas$child,peas$parent)

Run the code above in your browser using DataLab