The combined-sample tie sums shrink the null variance of U/W and
inflate Kruskal-Wallis H (Gibbons Chs. 6.6, 8.2, 10.4). Mirrors
morie.fn.gb661t/gb821t/gb1041t.
Usage
morie_rank_tie_variance(x = NULL, y = NULL, groups = NULL)
Arguments
- x, y
the two samples (two-sample mode), or
- groups
list of samples (Kruskal-Wallis mode).
Value
two-sample: list U, W, mean_U, var_corrected,
var_uncorrected, z, p_two_sided; KW: list H, H_uncorrected,
correction, df, p_value.
References
Gibbons & Chakraborti (2021), Chs. 6.6, 8.2, 10.4.
Examples
morie_rank_tie_variance(c(1, 2, 2, 3), c(2, 3, 3, 4))$U
#> [1] 3