Implementation of the asymptotically distribution-free test for equivalence of discrete distributions in terms of the Mann-Whitney-Wilcoxon functional generalized to the case that ties between observations from different distributions may occur with positive probability. For details see Wellek S (2010) Testing statistical hypotheses of equivalence and noninferiority. Second edition, \(\S\) 6.4.
mwtie_xy(alpha,m,n,eps1_,eps2_,x,y)significance level
size of Sample 1
size of Sample 2
absolute value of the left-hand limit of the hypothetical equivalence range for \(\pi_+/(1-\pi_0) - 1/2\)
right-hand limit of the hypothetical equivalence range for \(\pi_+/(1-\pi_0) - 1/2\)
row vector with the \(m\) observations making up Sample1 as components
row vector with the \(n\) observations making up Sample2 as components
significance level
size of Sample 1
size of Sample 2
absolute value of the left-hand limit of the hypothetical equivalence range for \(\pi_+/(1-\pi_0) - 1/2\)
right-hand limit of the hypothetical equivalence range for \(\pi_+/(1-\pi_0) - 1/2\)
observed value of the \(U\)-statistics -- based estimator of \(\pi_+/(1-\pi_0)\)
square root of the estimated asymtotic variance of \(W_+/(1-W_0)\)
upper critical bound to \(|W_+/(1-W_0) - 1/2 - (\varepsilon^\prime_2-\varepsilon^\prime_1)/2|/\hat{\sigma}\)
indicator of a positive [=1] vs negative [=0] rejection decision to be taken with the data under analysis
Notation: \(\pi_+\) and \(\pi_0\) stands for the functional defined by \(\pi_+ = P[X>Y]\) and \(\pi_0 = P[X=Y]\), respectively, with \(X\sim F \equiv\) cdf of Population 1 being independent of \(Y\sim G \equiv\) cdf of Population 2.
Wellek S, Hampel B: A distribution-free two-sample equivalence test allowing for tied observations. Biometrical Journal 41 (1999), 171-186.
Wellek S: Testing statistical hypotheses of equivalence and noninferiority. Second edition. Boca Raton: Chapman & Hall/CRC Press, 2010, \(\S\) 6.4.
# NOT RUN {
x <- c(1,1,3,2,2,3,1,1,1,2)
y <- c(2,1,2,2,1,1,2,2,2,1,1,2)
mwtie_xy(0.05,10,12,0.10,0.10,x,y)
# }
Run the code above in your browser using DataLab