<< nan_skewness Descriptive Statistics nan_statistic >>

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_spearman

nan_spearman

Spearman's rank correlation coefficient.

Calling Sequence

[R,p,ci1,ci2] = CORRCOEF(x, [y, ] 'Rank');

Description

This function is replaced by CORRCOEF. Significance test and confidence intervals can be obtained from CORRCOEF.

For some (unknown) reason, in previous versions Spearman's rank correlation r = nan_corrcoef(ranks(x)).

But according to [1], Spearman's correlation is defined as r = 1-6*sum((ranks(x)-ranks(y)).^2)/(N*(N*N-1)) The results are different. Here, the later version is implemented.

See also

Bibliography

[1] http://mathworld.wolfram.com/SpearmanRankCorrelationCoefficient.html

[2] http://mathworld.wolfram.com/CorrelationCoefficient.html

Authors


Report an issue
<< nan_skewness Descriptive Statistics nan_statistic >>