BWS Many-To-One Comparison Test
Performs Baumgartner-Weiß-Schindler many-to-one comparison test.
bwsManyOneTest(x, ...) ## Default S3 method: bwsManyOneTest( x, g, alternative = c("two.sided", "greater", "less"), method = c("BWS", "Murakami", "Neuhauser"), p.adjust.method = p.adjust.methods, ... ) ## S3 method for class 'formula' bwsManyOneTest( formula, data, subset, na.action, alternative = c("two.sided", "greater", "less"), method = c("BWS", "Murakami", "Neuhauser"), p.adjust.method = p.adjust.methods, ... )
x |
a numeric vector of data values, or a list of numeric data vectors. |
... |
further arguments to be passed to or from methods. |
g |
a vector or factor object giving the group for the
corresponding elements of |
alternative |
the alternative hypothesis. Defaults to |
method |
a character string specifying the test statistic to use. Defaults to |
p.adjust.method |
method for adjusting p values (see |
formula |
a formula of the form |
data |
an optional matrix or data frame (or similar: see
|
subset |
an optional vector specifying a subset of observations to be used. |
na.action |
a function which indicates what should happen when
the data contain |
For many-to-one comparisons (pairwise comparisons with one control) in an one-factorial layout with non-normally distributed residuals Baumgartner-Weiß-Schindler's non-parametric test can be performed. Let there be k groups including the control, then the number of treatment levels is m = k - 1. Then m pairwise comparisons can be performed between the i-th treatment level and the control. H_i: F_0 = F_i is tested in the two-tailed case against A_i: F_0 \ne F_i, ~~ (1 ≤ i ≤ m).
For method == "Murakami"
the modified BWS statistic
denoted B* and its corresponding Pr(>|B*|) is computed by sequentially calling
murakami_stat
and murakami_cdf
.
For method == "Murakami"
only a two-sided test is possible.
If alternative == "greater"
then the alternative, if one
population is stochastically larger than the other is tested:
H_i: F_0 = F_i against A_i: F_0 ≥ F_i, ~~ (1 ≤ i ≤ m).
The modified test-statistic B* according to Neuhäuser (2001) and its
corresponding Pr(>B*) or Pr(<B*) is computed by sequentally calling
murakami_stat
and murakami_cdf
with flavor = 2
.
The p-values can be adjusted to account for Type I error
inflation using any method as implemented in p.adjust
.
A list with class "PMCMR"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
lower-triangle matrix of the estimated quantiles of the pairwise test statistics.
lower-triangle matrix of the p-values for the pairwise tests.
a character string describing the alternative hypothesis.
a character string describing the method for p-value adjustment.
a data frame of the input data.
a string that denotes the test distribution.
Baumgartner, W., Weiss, P., Schindler, H. (1998) A nonparametric test for the general two-sample problem, Biometrics 54, 1129–1135.
Murakami, H. (2006) K-sample rank test based on modified Baumgartner statistic and its power comparison, J. Jpn. Comp. Statist. 19, 1–13.
Neuhäuser, M. (2001) One-side two-sample and trend tests based on a modified Baumgartner-Weiss-Schindler statistic. Journal of Nonparametric Statistics 13, 729–739.
out <- bwsManyOneTest(weight ~ group, PlantGrowth, p.adjust="holm") summary(out) ## A two-sample test set.seed(1245) x <- c(rnorm(20), rnorm(20,0.3)) g <- gl(2, 20) summary(bwsManyOneTest(x ~ g, alternative = "less", p.adjust="none")) summary(bwsManyOneTest(x ~ g, alternative = "greater", p.adjust="none")) ## Not run: ## Check with the implementation in package BWStest BWStest::bws_test(x=x[g==1], y=x[g==2], alternative = "less") BWStest::bws_test(x=x[g==1], y=x[g==2], alternative = "greater") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.