spearman.sq: Spearman Correlation Squared

View source: R/strand.R

spearman.sqR Documentation

Spearman Correlation Squared

Description

The square of Spearman's rank correlation coefficient applied to two rankings \insertCitespearman_proof_1904lakhesis. 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

\insertAllCited

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)


lakhesis documentation built on June 22, 2024, 10:27 a.m.