How to calculate the value of correlation coefficient r using Spearman correlation coefficient test?

6 次查看(过去 30 天)
HI, For attached rainfall data sheet A.Xls I want to calculate the value of correlation coefficient "r" by using Spearman correlation coefficient test. Can some one help me to calculate it in mat-lab. Moreover kindly guide me how to interpret the value of r for strong, week and negligible correlation.

采纳的回答

jean claude
jean claude 2017-12-6
if you have the statistics toolbox you can use
[RHO,PVAL] = corr(x,y,'type','Spearman')

更多回答(1 个)

Muhammad shahid
Muhammad shahid 2017-12-7
Dear jean claude I have developed this code for data in one column. I wan to perform this on many columns like for attached data set "B.xls" hOW I Would have to modify this code?
data = xlsread('V'); [nrows, ncolumns] = size(data); for i = 1:ncolumns X = data(1:nrows-1); Y = data(2:nrows); [RHO,PVAL] = corr(X,Y,'type','Spearman'); end

类别

Help CenterFile Exchange 中查找有关 测试框架 的更多信息

Community Treasure Hunt

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

Start Hunting!