wilcoxonZ.RdCalculates the z statistic for a Wilcoxon two-sample, paired, or one-sample test.
wilcoxonZ(
x,
y = NULL,
mu = 0,
paired = FALSE,
exact = FALSE,
correct = FALSE,
digits = 3
)A vector of observations.
For the two-sample and paired cases, a second vector of observations.
For the one-sample case,
the value to compare x to, as in wilcox.test
As used in wilcox.test.
As used in wilcox.test,
default here is FALSE.
As used in wilcox.test,
default here is FALSE.
The number of significant digits in the output.
A single statistic, z.
This function uses code from wilcox.test,
and reports the z statistic,
which is calculated by the original function
but isn't returned.
The returned value will be NA if the function attempts an exact test.
For the paired case, the observations in x and
and y should be ordered such that the
first observation in x is paired with the first observation
in y, and so on.
data(Pooh)
wilcoxonZ(x = Pooh$Likert[Pooh$Time==1], y = Pooh$Likert[Pooh$Time==2],
paired=TRUE, exact=FALSE, correct=FALSE)
#> z
#> -2.33