spearmanCorTest

Tests the hypothesis that the Spearman correlation between two ranges is different from some 0. Alternatives are Alt.less (spearmanCor(range1, range2) < 0), Alt.greater (spearmanCor(range1, range2) > 0) and Alt.twoSided (spearmanCor(range1, range2) != 0).

spearmanCorTest
(
T
U
)
if (
isInputRange!(T) &&
isInputRange!(U)
&&
is(typeof(range1.front < range1.front) == bool)
&&
is(typeof(range2.front < range2.front) == bool)
)

Return Value

Type: TestRes

A TestRes containing the Spearman correlation coefficient and the P-value for the given alternative.

Bugs

Exact P-value computation not yet implemented. Uses asymptotic approximation only. This is good enough for most practical purposes given reasonably large N, but is not perfectly accurate. Not valid for data with very large amounts of ties.

Meta