Spearman's rank correlation coefficient - Wikipedia
https://en.wikipedia.org/wiki/Spearman's_rank_correlation_coefficient• R's statistics base-package implements the test cor.test(x, y, method = "spearman") in its "stats" package (also cor(x, y, method = "spearman") will work.• Stata implementation: spearman varlist calculates all pairwise correlation coefficients for all variables in varlist.• MATLAB implementation: [r,p] = corr(x,y,'Type','Spearman') where r is the Spearman's rank correlation coefficient, p is the p-value, and x and y are vectors.