Spearman correlation in Matlab!
232 次查看(过去 30 天)
显示 更早的评论
Hey Matlab users,
If I have two series of data:
a = [1 4 6 3 4 6 7 8]; b [34 56 34 56 79 23 48 28];
and I want to perform a Spearman correlation what would be the proper command in MATLAB? I need both p-value and RHO.
Thanks for your help.
Mehdi
0 个评论
采纳的回答
Wayne King
2011-10-27
Hi, If you have the Statistics Toolbox.
a = [1 4 6 3 4 6 7 8];
b = [34 56 34 56 79 23 48 28];
[RHO,PVAL] = corr(a',b','Type','Spearman');
0 个评论
更多回答(1 个)
Rithy Khouy
2022-8-25
a = [1 4 6 3 4 6 7 8];
b = [34 56 34 56 79 23 48 28];
[RHO,PVAL] = corr(a',b','Type','Spearman');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!