| wilcox.test(ctest) | R Documentation |
Performs one and two sample Wilcoxon tests on vectors of data.
wilcox.test(x, y = NULL, alternative = "two.sided", mu = 0,
paired = FALSE, exact = NULL, correct = TRUE)
x |
numeric vector of data values. |
y |
an optional numeric vector of data values. |
alternative |
indicates the alternative hypothesis and must be
one of "two.sided", "greater" or "less".
You can specify just the initial letter. |
mu |
a number specifying an optional location parameter. |
paired |
a logical indicating whether you want a paired test. |
exact |
a logical indicating whether an exact p-value should be computed. |
correct |
a logical indicating whether to apply continuity correction in the normal approximation for the p-value. |
If only x is given, or if both x and y are
given and paired is TRUE, a Wilcoxon signed rank test
of the null that the median of x (in the one sample case) or
of x-y (in the paired two sample case) equals mu is
performed.
Otherwise, if both x and y are given and paired
is FALSE, a Wilcoxon rank sum test (equivalent to the
Mann-Whitney test) is carried out. In this case, the null
hypothesis is that the location of the distributions of x and
y differ by mu.
By default (if exact is not specified), an exact p-value is
computed if the samples contain less than 50 finite values and
there are no ties. Otherwise, a normal approximation is used.
"htest" containing the following
components:
statistic |
the value of the test statistic with a name describing it. |
parameter |
the parameter(s) for the exact distribution of the test statistic. Currently, only normal approximations are used. |
p.value |
the p-value for the test. |
null.value |
the location parameter mu. |
alternative |
a character string describing the alternative hypothesis. |
method |
the type of test applied. |
data.name |
a character string giving the names of the data. |