WMW(): Basics
WMW() modernizes the classic Wilcoxon-Mann-Whitney methodology for comparing two groups with respect to a Y variable that is at least ordinal in scale, a situation often encountered in practice. The schemas used here make the WMW analyses straightforward and comprehensive. Undergirding WMW() is a single parameter, WMWprob, a simple probability that describes how often the Y values in one group exceed those in the other group . WMWodds is just the odds re-scaling of WMWprob.
WMWprob. Let Y1 and Y2 be independent observations from groups A and B. At the heart of a WMW() analysis is the effect-size parameter
WMWprob = Prob[Y1 > Y2] + Prob[Y1 = Y2]/2.
WMWprob measures how much Y1 is stochastically greater than Y2. If WMWprob = 0.50, then Y1 and Y2 are stochastically equal. If WMWprob < 0.50, then Y1 is stochastically less than Y2. If WMWprob > 0.50, then Y1 is stochastically greater than Y2.
WMWprob = Prob[Y1 > Y2] + Prob[Y1 = Y2]/2.
WMWprob measures how much Y1 is stochastically greater than Y2. If WMWprob = 0.50, then Y1 and Y2 are stochastically equal. If WMWprob < 0.50, then Y1 is stochastically less than Y2. If WMWprob > 0.50, then Y1 is stochastically greater than Y2.
WMWodds. Transforming WMWprob to its associated odds (not an odds ratio!) uses
WMWodds = WMWprob/(1 - WMWprob).
For example, WMWprob = 0.80 translates to WMWodds = 4.0. WMWodds = 1.0 denotes stochastically equality of Y1 versus Y2. Likewise, confidence limits for WMWprob are transformed to those for WMWodds.
WMWodds = WMWprob/(1 - WMWprob).
For example, WMWprob = 0.80 translates to WMWodds = 4.0. WMWodds = 1.0 denotes stochastically equality of Y1 versus Y2. Likewise, confidence limits for WMWprob are transformed to those for WMWodds.
Estimating WMWprob and WMWodds is not complicated.. In Example 1, the sample sizes are n1 = 51 and n2 = 58, so there are 51*58 = 2958 (Y1, Y2) pairs. 2487 have Y1 > Y2, 310 have Y1 = Y2, and 161 have Y1 < Y2. The sample WMWprob is (2487 + 310/2)/2958 = 0.893, and the sample WMWodds is (2487 + 310/2)/(161 + 310/2) = 8.36. WMW() reports this as:
************************************************************
Stochastic Superiority # of Pairs Probability
************************** ********** ***********
{Abnormal} < {Normal} 161 0.054
{Abnormal} = {Normal} 310 0.105
{Abnormal} > {Normal} 2487 0.841
Total: 2958 1.000
WMWprob = (2487 + 310/2)/2958 = 0.893
WMWodds = 0.893/(1 - 0.893) = 8.36
************************************************************
Whether to communicate in terms of WMWprob or WMWodds depends on one's personal preference, field of research, general nature of the study, and specific research question.
Obtaining confidence intervals for WMWprob is complex. WMW() uses two methods to get CIs for WMWprob, Mee's (1990) method and Newcombe's Method 3, selections resulting from from Newcombe's (2006) investigation of eight methods and my further work, summarized within this site.
Mee's method. In my opinion, Newcombe's Monte Carlo results favor the method given by Mee (1990), an opinion is further strengthened by own Monte Carlo study detailed in Example 8. Mee's method gives excellent balance and rates with respect to whether a two-sided CI will miss on the left or the right, e.g,., having left and right non-coverage probabilities both near 0.025 for a 95% CI. This translates to having good coverage rates for one-sided CIs. Thus, I recommend Mee's method and have made it the default in WMW(). Newcombe (2006) summarized Mee's method succinctly and the coding syntax and comments within my function CI.WMWprobMee() are so aligned.
Newcombe's Method 3. The alternative method in WMW() uses the approximation for the standard error of WMWprob advanced by Hanley and McNeil (1982), but uses Wilson's scoring CI method rather than the simpler Wald CI method popular decades ago. Newcombe summarized the calculations succinctly, and the coding syntax and comments in my function CI.WMWprobNewc35() below are so aligned. Note that although Newcombe recommended his "Method 5," I found that it is theoretical flawed and thus has poor CI coverage characteristics. |
*****************************************************************
Estimate 0.95 CI* H0 p**
*****************************************************************
WMWprob 0.893 [0.831, 1.000] 0.800 0.010 (one-sided)
WMWodds 8.36 [4.93, Inf] 4.00 0.010 (one-sided)
*****************************************************************
*Method based on Mee (JASA, 1990).
**P-value is always congruent with both confidence intervals.
Hypothesis tests must be specifiied explicitly. To counter their ubiquitous use and misunderstanding, a p-value is not computed unless the user specifies a null value, H0.WMWprob or H0.WMWodds. The common test assesses H0: WMWprob = 0.50 vs. H1: WMWprob ≠ 0.50 (or H0: WMWodds = 1.00 vs. H1: WMWodds ≠ 1.00), but most research questions are better addressed with tailored hypotheses.. For any hypothesis test, WMW()'s p-values and CIs are congruent (as they always should be), meaning that, say, p < 0.05 if and only if the 95% CIs for WMWprob and WMWodds do not capture H0.WMWprob and H0.WMWodds. This holds for both two-sided and one-sided CIs. The type of CI determines how H0 vs. H1 are structured.
In Example 1b, the setting CI.type="L" and H0.WMWprob=0.80 defines a tailored hypothesis of H0: WMWprob ≤ 0.80 versus H1: WMWprob > 0.80. See results above.