This function calculates the probability of superiority (i.e., Phat) and its confidence interval based on Brunner and Munzel (2000) heteroscedastic analog of WMW test. It is based on Wilcox'x bmp function with some amendments. It does not include a plotit facility. It uses the smallest non-zero variance to identify confidence intervals and statistical significance for values of Phat=0 and Phat=1. It ensure that confidence intervals do not take on invalid values such as values <0 or >1.
calculatePhat(x, y, alpha =0.05, sigfig =-1)
Arguments
x: is a vector of values from group 1
y: is a vector of values from group 2
alpha: is the Type 1 error level for statistical tests
sigfig: is the number of significant digits. If sigfig>0 the data in x and y is truncated to the specified number of significant digits.
Returns
list including the value of the t-test for PHat, the estimate of PHat and Cliff's d, and the confidence intervals for PHat.