The Brunner--Munzel test for stochastic equality of two samples,
which is also known as the Generalized Wilcoxon Test.
NA
s from the data are omitted.
brunner.munzel.test(x, y, alternative = c("two.sided", "greater",
"less"), alpha = 0.05)
the numeric vector of data values from the sample 1.
the numeric vector of data values from the sample 2.
a character string specifying the alternative hypothesis,
must be one of "two.sided"
(default), "greater"
or
"less"
. User can specify just the initial letter.
significance level, default is 0.05 for 95% confidence interval.
A list of class "htest"
with the following components:
the Brunner--Munzel test statistic.
the degrees of freedom.
the confidence interval.
the
a character string giving the name of the data.
an estimate of the effect size, i.e.,
There exist discrepancies with Brunner_Munzel_2000;textuallawstat because there is a typo in the paper. The corrected version is in Neubert_Brunner_2007;textuallawstat (e.g., compare the estimates for the case study on pain scores). The current function follows Neubert_Brunner_2007;textuallawstat.
# NOT RUN {
## Pain score on the third day after surgery for 14 patients under
## the treatment Y and 11 patients under the treatment N
## (see Brunner and Munzel, 2000; Neubert and Brunner, 2007).
Y <- c(1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1)
N <- c(3, 3, 4, 3, 1, 2, 3, 1, 1, 5, 4)
brunner.munzel.test(Y, N)
## Brunner-Munzel Test
## data: Y and N
## Brunner-Munzel Test Statistic = 3.1375, df = 17.683, p-value = 0.005786
## 95 percent confidence interval:
## 0.5952169 0.9827052
## sample estimates:
## P(X<Y)+.5*P(X=Y)
## 0.788961
# }
Run the code above in your browser using DataLab