spearman.sq {lakhesis} | R Documentation |
Spearman Correlation Squared
Description
The square of Spearman's rank correlation coefficient applied to two rankings (Spearman 1904). Rows with NA
values are automatically removed.
Usage
spearman.sq(r1, r2)
Arguments
r1 , r2 |
Two vectors of paired ranks. |
Value
The square of Spearman's rank correlation coefficient with NA values removed.
References
Spearman C (1904). “The Proof and Measurement of Association between Two Things.” American Journal of Psychology, 15, 72–101. doi:10.2307/1412159.
Examples
# e.g., for two partial seriations:
x <- c(1, 2, 3, 4, NA, 5, 6, NA, 7.5, 7.5, 9)
y <- c(23, 17, 19, NA, 21, 22, 25, 26, 27, 36, 32)
spearman.sq(x, y)
[Package lakhesis version 0.0.1 Index]