Chatterjee Correlation Coefficient
Version 1.0.0 (121 KB) by
qqffssxx
This function computes the Chatterjee coefficient between two vectors x and y
% This function computes the Chatterjee coefficient between two vectors x and y. If only one coefficient is computed it can be used to test independence using a Monte Carlo
% permutation test or through an asymptotic approximation test.
% x Vector of numeric values in the first coordinate.
% y Vector of numeric values in the second coordinate.
% pvalue Whether or not to return the p-value of rejecting independence, if TRUE the
% function also returns the standard deviation of xi.
% ties Do we need to handle ties? If ties=TRUE the algorithm assumes that the data
% has ties and employs the more elaborated theory for calculating s.d. and P-value.
% Otherwise, it uses the simpler theory. There is no harm in putting ties = TRUE
% even if there are no ties.
% method If method = "asymptotic" the function returns P-values computed by the asymptotic theory. If method = "permutation", a permutation test with nperm permutations is employed to estimate the P-value. Usually, there is no need for the
% permutation test. The asymptotic theory is good enough.
% nperm In the case of a permutation test, nperm is the number of permutations to do.
% In the case pvalue=FALSE, function returns the value of the xi coefficient, if the input is a matrix, a
% matrix of coefficients is returned. In the case pvalue=TRUE is chosen, the function returns a list:
% xi The value of the xi coefficient.
% sd The standard deviation.
% pval The test p-value.
% References
% Chatterjee, S. (2020) <arXiv:1909.10140>.
Cite As
qqffssxx (2024). Chatterjee Correlation Coefficient (https://www.mathworks.com/matlabcentral/fileexchange/132638-chatterjee-correlation-coefficient), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2017a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Acknowledgements
Inspired by: Kendall rank correlation coefficient
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |