Description Usage Arguments Value Note Author(s) References See Also Examples

Perform the Baumgartner-Weiss-Schindler hypothesis test.

1 2 |

`x` |
a vector of the first sample. |

`y` |
a vector of the first sample. |

`method` |
a character string specifying the test statistic to use. should be one of the following: - default
This is “Hobson's choice”, which uses the classical BWS test for two-sided alternative, but Neuhauser for one sided alternatives. - BWS
Use the classical BWS test. - Neuhauser
Use Neuhauser's test. - B1
Use Murakami's *B1*test.- B2
Use Murakami's *B2*test, which is exactly Neuhauser's test.- B3
Use Murakami's *B3*test.- B4
Use Murakami's *B4*test.- B5
Use Murakami's *B5*test.
Only Neuhauser's test supports one-sided alternatives. |

`alternative` |
a character string specifying the alternative hypothesis,
must be one of “two.sided” (default), “greater” or
“less”. You can specify just the initial letter.
“greater” corresponds to testing whether the survival function
of |

Object of class `htest`

, a list of the test statistic,
the p-value, and the `method`

noted.

The code will happily compute Murakami's *B_3* through *B_5*
for large sample sizes, even though nominal coverage is *not* achieved.
A warning will be thrown. User assumes all risk relying on results from this
function.

Steven E. Pav shabbychef@gmail.com

W. Baumgartner, P. Weiss, H. Schindler, 'A nonparametric test for the general two-sample problem', Biometrics 54, no. 3 (Sep., 1998): pp. 1129-1135. http://doai.io/10.2307/2533862

`bws_test`

, `bws_stat`

,
`murakami_stat`

, `murakami_cdf`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
# under the null
set.seed(123)
x <- rnorm(100)
y <- rnorm(100)
hval <- bws_test(x,y)
# under the alternative
set.seed(123)
x <- rnorm(100)
y <- rnorm(100,mean=1.0)
hval <- bws_test(x,y)
show(hval)
stopifnot(hval$p.value < 0.05)
# under the alternative with a one sided test.
set.seed(123)
x <- rnorm(100)
y <- rnorm(100,mean=0.7)
hval <- bws_test(x,y,alternative='less')
show(hval)
stopifnot(hval$p.value < 0.01)
hval <- bws_test(x,y,alternative='greater')
stopifnot(hval$p.value > 0.99)
hval <- bws_test(x,y,alternative='two.sided')
stopifnot(hval$p.value < 0.05)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.