Estimates the CDF of the Murakami test statistics via permutations.
murakami_cdf(B, n1, n2, flavor = 0L, lower_tail = TRUE)
a vector of the same size as B
of the CDF under the null.
the Murakami test statistic or a vector of the same.
number of elements in the first sample.
number of elements in the second sample.
the 'flavor' of the test statistic. See
murakami_stat
.
boolean, when TRUE
returns the CDF,
Steven E. Pav shabbychef@gmail.com
Given the Murakami test statistic
W. Baumgartner, P. Weiss, H. Schindler, 'A nonparametric test for the general two-sample problem', Biometrics 54, no. 3 (Sep., 1998): pp. 1129-1135. tools:::Rd_expr_doi("10.2307/2533862")
M. Neuhauser, 'Exact tests based on the Baumgartner-Weiss-Schindler Statistic--a survey', Statistical Papers 46, no. 1 (2005): pp. 1-30. tools:::Rd_expr_doi("10.1007/BF02762032")
M. Neuhauser, 'One-sided two-sample and trend tests based on a modified Baumgartner-Weiss-Schindler statistic', J. Nonparametric Statistics 13, no. 5 (2001): pp 729-739. tools:::Rd_expr_doi("10.1080/10485250108832874")
H. Murakami, 'K-sample rank test based on modified Baumgartner statistic and its power comparison', J. Jpn. Comp. Statist. 19, no. 1 (2006): pp. 1-13. tools:::Rd_expr_doi("10.5183/jjscs1988.19.1")
H. Murakami, 'Modified Baumgartner Statistics for the two-sample and multisample problems: a numerical comparison', J. Stat. Comp. and Sim. 82, no. 5 (2012): pp. 711-728. tools:::Rd_expr_doi("10.1080/00949655.2010.551516")
H. Murakami, 'Lepage type statistic based on the modified Baumgartner statistic', Comp. Stat. & Data Analysis 51 (2007): pp 5061-5067. tools:::Rd_expr_doi("10.1016/j.csda.2006.04.026")
murakami_stat
.
# 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:
# \donttest{
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)))
# }
Run the code above in your browser using DataLab