murakami_cdf {BWStest}  R Documentation 
Estimates the CDF of the Murakami test statistics via permutations.
murakami_cdf(B, n1, n2, flavor = 0L, lower_tail = TRUE)
B 
the Murakami test statistic or a vector of the same. 
n1 
number of elements in the first sample. 
n2 
number of elements in the second sample. 
flavor 
the 'flavor' of the test statistic. See

lower_tail 
boolean, when 
Given the Murakami test statistic B_j for 0 <= j <= 5, computes the CDF under the null that the two samples come from the same distribution. The CDF is computed by permutation test and memoization.
a vector of the same size as B
of the CDF under the null.
the CDF is approximately computed by evaluating the permutations up to some reasonably small sample size (currently the cutoff is 9). When larger sample sizes are used, the distribution of the test statistic may not converge. This is apparently seen in flavors 3 through 5.
Steven E. Pav shabbychef@gmail.com
W. Baumgartner, P. Weiss, H. Schindler, 'A nonparametric test for the general twosample problem', Biometrics 54, no. 3 (Sep., 1998): pp. 11291135. http://doai.io/10.2307/2533862
M. Neuhauser, 'Exact tests based on the BaumgartnerWeissSchindler Statistic–a survey', Statistical Papers 46, no. 1 (2005): pp. 130. http://doai.io/10.1007/BF02762032
M. Neuhauser, 'Onesided twosample and trend tests based on a modified BaumgartnerWeissSchindler statistic', J. Nonparametric Statistics 13, no. 5 (2001): pp 729739. http://doai.io/10.1080/10485250108832874
H. Murakami, 'Ksample rank test based on modified Baumgartner statistic and its power comparison', J. Jpn. Comp. Statist. 19, no. 1 (2006): pp. 113. http://doai.io/10.5183/jjscs1988.19.1
H. Murakami, 'Modified Baumgartner Statistics for the twosample and multisample problems: a numerical comparison', J. Stat. Comp. and Sim. 82, no. 5 (2012): pp. 711728. http://doai.io/10.1080/00949655.2010.551516
H. Murakami, 'Lepage type statistic based on the modified Baumgartner statistic', Comp. Stat. & Data Analysis 51 (2007): pp 50615067. http://doai.io/10.1016/j.csda.2006.04.026
# basic usage: xv < seq(0,4,length.out=101) yv < murakami_cdf(xv, n1=8, n2=6, flavor=1L) plot(xv,yv) zv < bws_cdf(xv) lines(xv,zv,col='red') # check under the null: ## Not run: flavor < 1L n1 < 8 n2 < 8 set.seed(1234) Bvals < replicate(2000,murakami_stat(rnorm(n1),rnorm(n2),flavor)) # should be uniform: plot(ecdf(murakami_cdf(Bvals,n1,n2,flavor))) ## End(Not run)