This function implements a correlation-adjusted version of the Wilcoxon-Mann-Whitney test proposed by Wu and Smyth (2012).
It tests whether the mean rank of statistics in the test group is greater or less than the mean rank of the remaining statistic values.When the correlation (or variance inflation factor) is zero, the function performs the usual two-sample Wilcoxon-Mann-Whitney rank sum test.
The Wilcoxon-Mann-Whitney test is implemented following the formulas given in Zar (1999) Section 8.10, including corrections for ties and for continuity.
The test allows for the possibility that cases in the test group may be more highly correlated on average than cases not in the group.
When the correlation is non-zero, the variance of the rank-sum statistic is computing using a formula derived from equation (4.5) of Barry et al (2008).
When the correlation is positive, the variance is increased and test will become more conservative.