Spearman Rank Correlation

It calculates the Spearman rank correlation coefficient.
15.1K 次下载
更新时间 2006/10/10

无许可证

It calculates the Spearman rank correlation coefficient from 2 or more data sets, and the associated t-test and p-values. The code is adapted with major changes from the Numerical Recipes book (http://www.nr.com/)

Example:
>> x = [1 2 3 3 3]';
>> y = [1 2 2 4 3; rand(1,5)]';
>> [r,t,p] = spear(x,y)

>> [r,t,p]=spear(x,y)

r =

0.8250 -0.6000

t =

2.5285 -1.2990

p =

0.0855 0.2848

引用格式

Alexandros Leontitsis (2024). Spearman Rank Correlation (https://www.mathworks.com/matlabcentral/fileexchange/4374-spearman-rank-correlation), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Minor bug fix, thanks to Sunnia Chai