WMWodds()
Example 1. Replicate analysis of Newcombe (2006b)
Example 2. Data of Holmes and Williams (1954), used by Agresti (1980)
Example 3. Should "Super HDL" have been touted as effective?
Example 4. Statistical planning: Monte Carlo studies with WMWodds()
Example 5. A "congruent" plot: Using Q-scores to visualize WMWprob.
Example 6. Medians equal, yet WMWodds = 1.44, and 95% CI: [1.23, 1.68]
Example 7. Medians unequal, yet WMWodds = 1.0 & 95% CI: [0.794, 1.260]
Example 1. Replicate analysis of Newcombe (2006b)
Example 2. Data of Holmes and Williams (1954), used by Agresti (1980)
Example 3. Should "Super HDL" have been touted as effective?
Example 4. Statistical planning: Monte Carlo studies with WMWodds()
Example 5. A "congruent" plot: Using Q-scores to visualize WMWprob.
Example 6. Medians equal, yet WMWodds = 1.44, and 95% CI: [1.23, 1.68]
Example 7. Medians unequal, yet WMWodds = 1.0 & 95% CI: [0.794, 1.260]
Example 2. Data of Holmes and Williams (1954), used by Agresti (1980)
Storyline. Streptococcus pyogenes is the common bacterium that causes strep throat. A 1954 study by Holmes and Williams examined 72 children who were carriers and 1326 who were noncarriers and classified their tonsils as "normal" (0), "enlarged" (1), or "greatly enlarged" (2).
CONDITION OF TONSILS
-----------------------------------------------------
| "Greatly |
STREPTOCOCCUS | "Normal" "Enlarged" Enlarged" |
PYOGENE STATUS | (0) (1) (2) | n
--------------------------|-----------------------------------------------------
Noncarrier | 497 560 269 | 1326
Carrier | 19 29 24 | 72
--------------------------|-----------------------------------------------------
Code block 2.1. Create the data.
> noncarrier = rep(0:2, c(497, 560, 269))
> carrier <- rep(0:2, c( 19, 29, 24))
> StrepBugStatus <- c(rep("NonCarrier",length(noncarrier)),
+ rep("Carrier",length(carrier)))
> Condition = c(noncarrier,carrier)
Research question. Do children who carry the streptococcus pyogenes bacterium have enlarged tonsils? Let (Y.carrier, Y.noncarrier) be a pair of randomly selected scores from the two groups. There are 72*1326 = 95,472 unique pairings. Then
WMWprob = Prob[Y.carrier > Y.noncarrier] + Prob[Y.carrier = Y.noncarrier]/2.
WMWodds = WMWprob/( 1 - WMWprob)
If streptococcus pyogenes carriers tend to have enlarged tonsils, then WMWodds > 1.0. To be useful clinically and scientifically, this WMWodds should be meaningfully greater than 1.0, but no specific value is evident, nor is one needed when relying on the estimate and confidence interval. The question is tightly addressed by focusing on the lower confidence bound, and thus calls for computing a CI of the form [LCL, Inf].
WMWodds analysis.
> Ex3 <- WMW(Y=Condition, Group=StrepBugStatus, CI.type="L",
+ GroupLevel=c("Carrier", "NonCarrier"))
*******************************************************
WMW: Wilcoxon-Mann-Whitney Analysis
Comparing Two Groups with Respect to an Ordinal Outcome
*******************************************************
Counts
**********************************************************************
Condition
StrepBugStatus 0 1 2 Total
Carrier 19 29 24 72
NonCarrier 497 560 269 1326
**********************************************************************
Sample Probability Distributions
**********************************************************************
Condition
StrepBugStatus 0 1 2 Total
Carrier 0.26 0.40 0.33 1.00
NonCarrier 0.37 0.42 0.20 1.00
**********************************************************************
WMW Parameters
**********************************************************************
WMWprob = Pr[Condition{Carrier} > Condition{NonCarrier}] +
Pr[Condition{Carrier} = Condition{NonCarrier}]/2
WMWodds = WMWprob/(1-WMWprob)
**********************************************************************
Sample Sizes
***********************
Carrier 72
NonCarrier 1326
***********************
************************************************************
Stochastic Superiority # of Pairs Probability
************************** ********** ***********
{Carrier} < {NonCarrier} 23552 0.247
{Carrier} = {NonCarrier} 32139 0.337
{Carrier} > {NonCarrier} 39781 0.417
Total: 95472 1.000
WMWprob = (39781 + 32139/2)/95472 = 0.585
WMWodds = 0.585/(1 - 0.585) = 1.41
************************************************************
**************************************
Estimate 0.95 CI*
**************************************
WMWprob 0.585 [0.530, 1.000]
WMWodds 1.41 [1.13, Inf]
**************************************
*Method based on Mee (JASA, 1990).
The WMWodds estimate of 1.41 and lower 95% confidence limit of 1.13 supports concluding that carriers may tend to have enlarged tonsils, but this effect is not strong.
Agresti (1980) used these data to illustrate his generalized odds ratio (GOR), which is similar to WMWodds--the difference being that GOR ignores the ties between Y1 and Y2, which makes GOR > WMWodds when there are ties and GOR = WMWodds when there are no ties. Estimate of GOR: 39781/23552 = 1.69; 95% CI: [1.20, Inf].
Example 8 examines how well the three CI methods built into WMW() perform when Y has only three categories, as it does in this example. Mee's method seems superior, hence has been made the default in WMW().
WMWodds()
Example 1. Replicate analysis of Newcombe (2006b)
Example 2. Data of Holmes and Williams (1954), used by Agresti (1980)
Example 3. Should "Super HDL" have been touted as effective?
Example 4. Statistical planning: Monte Carlo studies with WMWodds()
Example 5. A "congruent" plot: Using Q-scores to visualize WMWprob.
Example 6. Medians equal, yet WMWodds = 1.44, and 95% CI: [1.23, 1.68]
Example 7. Medians unequal, yet WMWodds = 1.0 & 95% CI: [0.794, 1.260]