Does the Matlab Spearman correlation command rank original data?
显示 更早的评论
Does the following Matlab command rank original data, or does the data need to be ranked manually before using the command?
[rho,pval] = corr(x,y,'type','spearman');
回答(1 个)
Tim Jackman
2015-9-3
1 个投票
The corr command will rank the original data, so you should not need to rank the data before using the command. Also, corr computes p-values for Spearman's rho using either the exact permutation distributions (for small sample sizes), or large-sample approximations.
类别
在 帮助中心 和 File Exchange 中查找有关 Probability Distributions and Hypothesis Tests 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!