nan_rankcorr Data Correlation and Covariance nan_xcorr

NaN Toolbox >> NaN Toolbox > Data Correlation and Covariance > nan_tiedrank

nan_tiedrank

compute rank of samples, the mean value is used in case of ties

Parameters

R:

rank of vector X

Description

this function is just a wrapper for RANKS, and provided for compatibility with the statistics toolbox of matlab(tm)

Examples

Counting from smallest to largest, the two 20 values are 2nd and 3rd, so they both get rank 2.5 (average of 2 and 3):
nan_tiedrank([10 20 30 40 20]);
ans =
1.0000    2.5000    4.0000    5.0000    2.5000

See also

Authors

nan_rankcorr Data Correlation and Covariance nan_xcorr