% 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>.
引用格式
qqffssxx (2024). Chatterjee Correlation Coefficient (https://www.mathworks.com/matlabcentral/fileexchange/132638-chatterjee-correlation-coefficient), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2017a
兼容任何版本
平台兼容性
Windows macOS Linux标签
致谢
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |