spearman.sq | R Documentation |
The square of Spearman's rank correlation coefficient applied to two rankings \insertCitespearman_proof_1904lakhesis. Rows with NA
values are automatically removed.
spearman.sq(r1, r2)
r1 , r2 |
Two vectors of paired ranks. |
The square of Spearman's rank correlation coefficient with NA values removed.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.