Testing against Ordered Alternatives (Murakami's BWS Trend Test)
Testing against Ordered Alternatives (Murakami's BWS Trend Test)
Performs Murakami's modified Baumgartner-Weiß-Schindler test for testing against ordered alternatives.
bwsTrendTest(x,...)## Default S3 method:bwsTrendTest(x, g, nperm =1000,...)## S3 method for class 'formula'bwsTrendTest(formula, data, subset, na.action, nperm =1000,...)
Arguments
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 "x". Ignored with a warning if "x" is a list.
nperm: number of permutations for the assymptotic permutation test. Defaults to 1000.
formula: a formula of the form response ~ group where response gives the data values and group a vector or factor of the corresponding groups.
data: an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula).
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 NAs. Defaults to getOption("na.action").
Returns
A list with class "htest" containing the following components:
method: a character string indicating what type of test was performed.
data.name: a character string giving the name(s) of the data.
statistic: the estimated quantile of the test statistic.
p.value: the p-value for the test.
parameter: the parameters of the test statistic, if any.
alternative: a character string describing the alternative hypothesis.
estimates: the estimates, if any.
null.value: the estimate under the null hypothesis, if any.
Details
The null hypothesis, H0:F1(u)=F2(u)=…=Fk(u)u∈R
is tested against a simple order hypothesis, Hc("_\\mathrm{A}: F_1(u) \\le F_2(u) \\le \\ldots \\le\n", "Fk(u),F1(u)<Fk(u),uinR").
The p-values are estimated through an assymptotic boot-strap method using the function sample.
Note
One may increase the number of permutations to e.g. nperm = 10000
in order to get more precise p-values. However, this will be on the expense of computational time.
Factor labels for g must be assigned in such a way, that they can be increasingly ordered from zero-dose control to the highest dose level, e.g. integers {0, 1, 2, ..., k} or letters {a, b, c, ...}. Otherwise the function may not select the correct values for intended zero-dose control.
It is safer, to i) label the factor levels as given above, and to ii) sort the data according to increasing dose-levels prior to call the function (see order, factor).
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. J Nonparametric Stat 13 , 729--739.
See Also
sample, bwsAllPairsTest, bwsManyOneTest.
kruskalTest and shirleyWilliamsTest
of the package PMCMRplus, kruskal.test of the library stats.