Learn R Programming

wmwAUC (version 0.2.0)

wmw_pvalue: P-value for Wilcoxon-Mann-Whitney Test of No Group Discrimination (Continuous Variables)

Description

Tests \(\mathrm{H_0\colon AUC} = 0.5\) vs \(\mathrm{H_1\colon AUC} \neq 0.5\) with proper finite-sample corrections

Usage

wmw_pvalue(x, y, alternative = "two.sided")

Value

p-value

Arguments

x

Numeric vector of cases/group 1 values

y

Numeric vector of controls/reference group values

alternative

character: "two.sided", "greater", or "less"

Details

Implements the Bias-Corrected (BC) variance estimator with second-order U-statistic correction to provide honest p-values under \(\mathrm{H_0\colon AUC} = 0.5\). Uses three-tier approach: permutation \((n < 20)\), bias-corrected \((20 \le n < 50)\), asymptotic with correction \(n \ge 50\).

For medium samples, the naive variance estimators \(\widehat{\mathrm{Var}}(G(X))\) and \(\widehat{\mathrm{Var}}(F(Y))\) are corrected by subtracting O(1/n) bias terms of the form \((n_1 n_2)^{-1} \sum_i \hat{G}(X_i)(1 - \hat{G}(X_i))\) to prevent variance underestimation that would inflate Type I error rates.

Function assumes \(x\) represents cases and \(y\) represents the reference level, in accord with wilcox.test() and wmw_test(). Internal calculations convert to P(X < Y) framework to match theoretical derivations.